Debugging Web Applications... Quicker!

by Brad 14. January 2008 09:44

It's always frustrated me that Visual Studio takes so long to start debugging web applications compared to a standard windows form application. Also when you stop debugging it would kill the spawned IE window too - annoying if you were in the middle of testing something... Anyway I often found it was better to launch my own version of IE (so it remains open) then in Visual Studio select Debug > attach to process > then select the WebDeb.WebServer.EXE process(s). This was much quicker than clicking the standard "start debugging" button (or F5). But even that wasn't enough - it still annoyed me that you had to manually select the process to attach to - then while looking for something else I stumbled across the solution...

Right click the web site in the solution and select properties, followed by the "Start Options" node. In there change the "Start action" from the default "Use current page" to "Don't open a page. Wait for a response from an external application" then click OK. With the site still selected I recommend setting "Use dynamic ports" to false in the properties window - this means you'll always know what port to connect to. Now open IE as before and browse to the correct URL (and port). Now simply hit F5 in Visual Studio whenever you want to debug and it'll load quicker, without spawning a new instance of IE and it will remain open when you stop debugging.

Tags:

C# | Microsoft Visual Studio

Powered by BlogEngine.NET 1.5.0.7
Theme by Interakting

Interakting

A full service digital agency offering online strategy, design and usability, systems integration and online marketing services that deliver real business benefits and ensure your online objectives are met.

Calendar

<<  July 2010  >>
MoTuWeThFrSaSu
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

View posts in large calendar