Debugger Don't Work With Component In Design Mode

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

I have a component I'm writing. It appears that the debugger simply
doesn't work when in design mode. For example:

build the component
drop the component on a form
break points in the "New" sub don't fire
change a property
break points in the property don't fire

I've resorted to writing text out to a file to debug it. Reminds me of
mainframe Cobol debugging. The component is in the same project as the
form. This particular component inherits from the TextBox.

What am I missing?

Tom
 
I'm just used to the VB6 debugger. When working with a user control you
can debug design time code. By that I mean set a break point on a
Property Let then go to your test form and change that property. The
debugger stops you on that line.

Tom
 
Like you I miss the old VB6 way of debugging a visual component. It just
seemed to work quite naturally.

You CAN achieve what you need to do but it's a bit messy.

What you will need to do is start up another instance of Visual Studio with
the project of your component loaded. Then go to the Debug\Processes menu
and attach the debugger to the other instance of DevEnv.exe. It's a bit
slow (as all the communication is all cross-process) but it worked OK for
the very small project I was working on :-)

Hope this helps,

Nick Hall
 
Cool Cool Cool. Thanks Nick. We've been struggling with debugging some
controls for weeks now. This is great.

Tom
 
Oops. Spoke too soon. When I try to stop on certain lines the debugger
won't. It also appears to be highlighting lines as though it were
working off of another version of the source. How do I get it to use the
source I see in front of me.

Tom
 
Back
Top