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.


Bookmark with :
Digg It! DZone StumbleUpon Technorati Reddit Del.icio.us Newsvine Furl Blinklist
posted @ Monday, January 14, 2008 9:44 AM | in C# .NET Microsoft Visual Studio

Comments

No comments posted yet.

Post Comment

Title *
Name *
Email
Url
Comment *  


Please add 1 and 1 and type the answer here: