Alex Rivera | Logout

Why would the debugger not be stopping at a breakpoint in my ASP.NET application?

Asked 2009-05-13T07:54:18.593
51

I'm trying to debug a large ASP.NET application.

I set a breakpoint on the first line in Page_Load in Default.aspx.cs.

When I start the application, my breakpoint briefly turns into a red round outline with an exclamation in it, then turns back into a regular breakpoint, then the application starts without ever stopping at my breakpoint.

MSDN tells me that this symbol means "the breakpoint location has not been loaded". So how can I get the breakpoint location to load? It was working a couple weeks ago. What kinds of things could cause a breakpoint to "not be loaded"?

What can I do so that the debugger stops at my breakpoints again?

Addendum:

I still can't get debugging to work by pressing F5, but I can start the website, then do debug/attach-process to get into debugging mode. If anyone knows why this would work but when I press F5 it would not work (the debugging buttons don't even show up on F5), any ideas would be welcome.

Edit
Report

1 Answer

2

I had a similar problem with breakpoints not working and, at the same time, in the IIS Console I was not able to edit the configuration for my project, i.e. the Edit Configuration button was greyed out.

[To find the Edit Configuration button: Start | All Programs | Administrative Tools | Internet Information Services, then expand the required computer, expand Web Sites, expand Default Web Site, locate and right click on your required project, select Properties and then the ASP.Net tab.]

I discovered that in IIS, the ASP.Net version for my project was set to 4.0.30319. Once I set it to 2.0.50727, the Edit Configuration button became available (clickable) and my breakpoints worked again.

I also realised that it might be worth checking the ASP.Net version set in IIS for "Default Web Site" [in the IIS Console, expand Web Sites, right click on Default Web Site and select Properties then the ASP.Net tab], so that any new projects created in Visual Studio acquire the Default Web Site setting.

answered 2011-05-18T01:05:44.630

Your Answer