views:

18

answers:

1

My environment is Windows 7 + Visual Studio 2008.

I want to debug a custom WebControl at design-time. What I used to do in the old days of VS.NET 2003 was to add a statement "System.Diagnostics.Debugger.Break()" to the constructor, then I'd be prompted to attach a second instance of Visual Studio for debugging.

In my current environment of VS2008 + Windows-7 I just get an error message "Visual Studio has encountered a user-defined breakpoint" followed by "Visual Studio 2008 is restarting". Very helpful.

How can I get it to prompt me to attach a debugger?

A: 

Why wait for a prompt? Just start another instance, and use "Debug->Attach to Process"

John Saunders
Mainly because it's very slow when running under the debugger, so I want to attach at the last possible moment before the code I want to debug.
Joe
There's no reason for it to be any slower running under the debugger, unless it's throwing a lot of exceptions. The debugger is not an emulator.
John Saunders