Home Dashboard Directory Help
Search

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


Status: 

Closed
 as Deferred Help for as Deferred


3
0
Sign in
to vote
Type: Bug
ID: 634919
Opened: 1/6/2011 10:49:33 AM
Access Restriction: Public
0
Workaround(s)
view
2
User(s) can reproduce this bug

Description

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".
Details
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.

Thanks,
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.
http://blogs.msdn.com/b/webdevtools/archive/2007/12/13/workaround-debugging-global-aspx-cs-application-start-with-asp-net-web-server-within-visual-studio.aspx

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(http://support.microsoft.com)
Sign in to post a workaround.