views:

698

answers:

7

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

A: 

Things to try:

  1. Clean the Solution, then rebuild it.
  2. The fix suggested here.
  3. Another suggested here.
  4. And another suggested here.
George Stocker
Thanks for the links but unfortunately none of them solved my problem.
Darko Z
A: 

The following has worked for me most of the time when I had this problem:

Find where your projects dll cache is being held (usually in ASP.NET Temprorary Files). Then close VS, do an IISRESET /stop (if you're using IIS), delete all the files in dll cache. Do an IISRESET, start VS, open your project and rebuild it.

SirDemon
I gave it a try but the same problem persists, no modules for my web project in the modules view.
Darko Z
A: 

If you mouse hover over the empty circle it should give you a clue why the break point isn't being hit.

jan
I am aware of this. This is how I found that the symbols weren't being loaded as stated in the question.
Darko Z
+2  A: 

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 :)

Darko Z
If this is what solved it, accept it as your answer :)
SirDemon
wont let me accept my own answer for 48 hours :) will do as soon as i can...
Darko Z
A: 

I had the same problem. Check here: Tools->Options->Debugging

Check the script check box. Run the application.

I got installation corrupt message box, so did a repair of vs 2008, and its working now.

JS
A: 

I had this problem today - then found out that it happened because:

  1. Visual Studio 2008 had crashed, leaving Cassini (the intrinsic development web server) running on the original port.

  2. When I reopened my project and "Started" it, it couldnt run on the original port because the old development web server was still running (which I didnt notice)

  3. The pages browsed fine, but no breakpoints got hit because the URL I was using was still pointing to the old development web server port.

Jimbo
A: 

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.

Simon_Weaver