When trying to debug a ASP.NET MVC app, the breakpoints in my controllers arent getting hit. When entering debug mode they just show an empty red circle with a warning triangle instead of the normal full circle. This is strange because debugging was working fine until now, and no configuration changes have been made in my environment for a while.
I have seen this question and had a look at my modules view and the correct ones aren't being loaded, however I'm not sure how to remedy this. Also all the relevant pdb files are in the bin folder of the site.
Any suggestions on how to fix this?
Cheers!
EDIT: The app is running as a local site on IIS7 and I'm debugging with VS 2008
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.
Set breakpoints in source code To set a breakpoint in source code, click in the far left margin next to a line of code. You can also select the line and press F9, select Debug > Toggle Breakpoint, or right-click and select Breakpoint > Insert breakpoint. The breakpoint appears as a red dot in the left margin.
This problem occurs because ASP.NET debugging isn't enabled on the application.
Ok so after 4 hours wasted, I find that setting my web project as the startup project solves the issue! This surely must be a bug...
I hope I save someone out there half a day :)
Few more possibilities:
If you have a client and server in your solution (lets say a WPF and WCF app) you should make sure you select 'multiple startup projects'. [this one is similar to your accepted answer, but useful if you need a client running too]
Release mode is selected for the project. When doing a fresh get (as I discovered today) on a new machine VS seems to like to switch to 'Release' configuration profile.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With