Debugging during “Design Mode”
Recently I discovered that you can actually debug the visual studio’s designer. The need for something like usually started when you drag & drop and control on your window and you get some weird message in the taskbar or some scary messagebox. To try to figure out what causing this problem you can try the following:
1. In visual studio, select the project you want to debug.
2. Right click -> Properties.
3. Select the debugging tab.
4. Change the debug mode to Program.
5. Set the “Start Application” to be your visual studio IDE (C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.exe)
6. Set your solution file in the “command line argument field”.
7. Apply -> OK
8. Select the project you want to debug as the startup project.
10. Set a break point in the place you want to start debug (for example, your control constructor)
11. Drag & Drop the control to one of your windows -> the debugger stop in your breakpoint (its like we debug the visual studio drag & drop operation using visual studio itself)
Hope it helps.