Cannot Debug Application_Start Event in Global.asax - by theBoringCoder at work

Status : 

  Deferred<br /><br />
		The product team has reviewed this issue and has deferred it for consideration at a later time.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 634919 Comments
Status Closed Workarounds
Type Bug Repros 2
Opened 1/6/2011 10:49:33 AM
Access Restriction Public


Using VS.NET 2010 & ASP.NET 4.0 on a Windows 7 Enterprise workstation (IIS 7.5), I am not able to debug the Application_Start event in my website project hosted by IIS--that is to say, the break points  I have set are never "hit".  Breakpoints set in the same global.asax on the Session_Start event are "hit".
Sign in to post a comment.
Posted by Microsoft on 3/1/2011 at 4:28 PM
In addtition to the work around that Bill suggests, we are looking at potential solutions in future versions of IIS/VS but unfortunately I don't have and better fixes or work arounds for the currently shipping products.

Visual Studio Debugger Team
Posted by Microsoft on 2/10/2011 at 8:55 AM
The Application_start method is only called when the application is atarted and since generally Visual Studio leaves the web server running between debug sessions, this function will only get called once. A simple workaround is to touch global.asax after the debugger is attached in order to force an application recycle. Then during the next request, the break point that you set on Application_Start will be hit.

The information in the following blog post might help too.

Bill Hiebert
Web Platform and Tools
Posted by Microsoft on 1/6/2011 at 10:58 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(