How to debug while in design time

  • Thread starter Thread starter Laurent
  • Start date Start date
L

Laurent

Hi All

I've just created a new designer form my user control. I can not debug
(step into) my code because it is executing in design-mode and debugger is
not attached at this time.

Is there a way to attach the debugger ?

Thanks
Laurent
 
Laurent,

just an idea, you could try to attach the debugger to your devenv.exe
instance running. But I've never tried.

Regards,
Michael
 
Just to say: it was a very very very very ..........(1 billion times
lol).............. very very good idea ))))

If I attach the debugger to the running Visual Studio I can catch the
exception without crashing (and send report).
If I just want to step into but have no exception, I have to call
System.Diagnostics.Debugger.Break(); to generate an exception and reattach
to the debugger (new instance or not).

So, I am happy : it works
 
your welcome ;)

Laurent said:
Just to say: it was a very very very very ..........(1 billion times
lol).............. very very good idea ))))

If I attach the debugger to the running Visual Studio I can catch the
exception without crashing (and send report).
If I just want to step into but have no exception, I have to call
System.Diagnostics.Debugger.Break(); to generate an exception and reattach
to the debugger (new instance or not).

So, I am happy : it works
 
Laurent said:
Just to say: it was a very very very very ..........(1 billion times
lol).............. very very good idea ))))

If I attach the debugger to the running Visual Studio I can catch the
exception without crashing (and send report).
If I just want to step into but have no exception, I have to call
System.Diagnostics.Debugger.Break(); to generate an exception and
reattach to the debugger (new instance or not).

So, I am happy : it works

To automate it: go to the properties of the project in vs.net, and in
there go to the Configuration -> Debugging section, there, you select
Debug mode: Program (click Apply) and for Start application you
specify devenv.exe

Now set a breakpoint in your code and press F5. You'll get another
Devenv to open. Load a testproject in where you USE the designer, and
you should hit your breakpoint in the other instance.

FB
debug >> (step into) my code because it is executing in design-mode
and debugger >> is


--
 
Back
Top