Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 433
Edward Tanguay Avatar asked May 13 '09 07:05

Edward Tanguay


People also ask

Why are my breakpoints not working?

If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.

How do I stop debugging from running?

Just press Ctrl + F8. Alternatively you can click the related button next to the buttons controlling the debugger. This way the execution won't stop.

What happens when a breakpoint is reached when the debugger is enabled?

This breakpoint lets you break the code only once. When debugging, the Visual Studio debugger only pauses the running application once for this breakpoint and then removes it immediately after it has been hit.


1 Answers

Try doing a full rebuild on the application. Pay attention that it's in the "Debug" configuration.

As far as I understand (but I'm not an expert in these things), this can happen when the debug info files (.PDB) are out of sync with the real compiled thing.

like image 91
Vilx- Avatar answered Sep 28 '22 07:09

Vilx-