When debugging aspnet solutions a lot of time is wasted on restarting the debugged application. A real time saver is to connect to the process to avoid restarting.
This is done like so:
- When a new bug is found don't stop the web browser, instead detach from the process (menu->detach->detach all).
- Update the code to correct the bug.
- Set a breakpoint.
- Connect (menu->attach to process->[find the process, it is called something like iis or aspnet]->attach) to the process.
- Reload the web browser.
There are some caveats. Like when using Webform the viewstate is tightly connected to the controls on the form so it is not always possible to connect.
But for the most times this is a great time saver.
1 comment:
- Update the code to correct the bug.
- Build project (even faster: current solution Ctrl+F6)
- Set a breakpoint.
- Build->Attach to process->W3wp.exe (build->attach to process can be also accessed via Ctrl+Alt+P)
- Reload the web browser.
Post a Comment