Macro for attaching to a process
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.
When you have done this a couple of times even this takes long time. So fire up the macro recorder and do the recipe above. Then run the temporary macro. Running the macro is way faster than doing it manually. I guess it is all the GUI stuff that takes time.
Or store the macro in VS and create a button and/or a shortcut.
Update: use shift-ctrl-P to run last macro. Nice if one is too lazy to create a menu.