views:

111

answers:

3

I have downloaded an open source project that I would like to use to further my ASP.NET MVC skills. The project is split up into multiple smaller projects.

When I launch the web site in debugging mode, is there a way to set the debugger to stop without having set a break point so I can step through the code and see what is happening before the view is being rendered?

Thanks

+3  A: 

Under the Debug menu choose Step Into - It will launch the debugger to the first line of code. Standard Shortcut is F11

Gavin Miller
+1 for being faster at the keyboard than I am ;o)
Fredrik Mörk
+1  A: 

While in debug mode, you can press the pause button from the debug bar. It will break the execution at the current execution point. You can then continue the execution step by step for current thread, or set breakpoints, etc.

Cătălin Pitiș
+1. That would of been my answer too.
RichardOD
+3  A: 

You can also use one of the following statements:

System.Diagnostics.Debugger.Launch();

This will launch and attach a debugger to your running process.

System.Diagnostics.Debugger.Break();

This signals a breakpoint to an already attached debugger.

0xA3
This one is a nice trick. Using it frequently. Only - must remember to cleanup after.
Arnis L.
It's especially helpful for breaking on complex conditions.
0xA3