Custom Control Debugging - Design Time!

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Greetings & Salutations,

I have already scanned the posts for my problem & have found a couple that
deal with problems that have the exact same symptoms as mine, however the
solutions do not work for me.

I am trying to debug a web custom control. (Sorry did I just hear you groan?)

I am using VS2003 and have setup two projects in the same solution, one
being the web control library, and the other being an ASP.NET web application
(for testing of the controls).

I have added a project reference to the web application for the controls &
created three controls in the library. One control is fully functional and is
a simple composite control. One control is still under development but is in
a 'dormant' state, (ie, it won't do anything, but it is kind enough to
function like an empty read-only label control), this control is never used
at this stage.

The third control is a template control (though it is NOT data bound) and
because it is pre-alpha I have put the control, template container and
designer classes all in the one source file. (I don't think it will make a
difference, but being MS I thought I'd mention it)

In the solutions mentioned in a couple of posts an MVP has mentioned that
this project setup should allow me to set breakpoints in my control & debug
in design time.

Unfortunately, I can set as many debug breakpoints in the designer class as
I want and the IDE simply ignores them all. I get the feeling that the IDE
does not do ANYTHING related to debugging as I cannot even get Debug.Write to
work (I get absolutely no output anywhere, and I even ended up opening as
many 'View' windows as I could(Output/CommandWindow/etc)).

Has someone come up with a workable procedure for custom control design-time
debugging? Where would I be able to find references to such 'Help' media? Or
have I made a big booboo somewhere?

Thank you.
.



Relevant Pages

  • Re: CompositeControl fails to display in Design view
    ... Can you debug the designer in Visual Studio? ... In Order to debug a Custom Control you need to Start ANOTHER copy of Visual ... protected override void LoadControlState ...
    (microsoft.public.dotnet.framework.aspnet.buildingcontrols)
  • Re: PDA application development
    ... Chris Tacke, Embedded MVP ... To get it to even work at all - not considering designer support ... write a COM interop wrapper around the control. ... "Michael Salamone" wrote: ...
    (microsoft.public.pocketpc.developer)
  • Re: Any way to tell if you are in the designer from a static function?
    ... to load Visual Studio itself in the debugger, to do that set the debug ... debug with that startup project. ... I know exactly where the problem is, because the designer actually tells ... the exact file and line number that caused the control to not be able to ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Disappearing Controls when the designer loads a form.
    ... which were traced to an exception my user control threw while in the designer. ... private ArrayList readOnlyColumnsList; ... public string ReadOnlyColumns ...
    (microsoft.public.dotnet.framework.windowsforms.designtime)
  • Re: Control Array element doesnt exist, Which one?
    ... following exception error, which occurs on the form.showstatement ... The error is: Control array ... The form displays properly in vs2005 designer. ... break point in the program and debug because all breakpoints are ...
    (microsoft.public.dotnet.languages.vb)