When debugging ASP.NET MVC app, breakpoints are not hit

后端 未结 18 1404
盖世英雄少女心
盖世英雄少女心 2020-12-25 11:45

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 trian

相关标签:
18条回答
  • 2020-12-25 12:18

    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.

    0 讨论(0)
  • 2020-12-25 12:18

    Quick fix...

    Run my project in Debug. Cleaned and rebuild solution (MVC).

    Re run the UI project and the Breakpoints started working again.

    Hope this will help someone.

    0 讨论(0)
  • 2020-12-25 12:20

    Change in Visual Studio Header Release option to Debug

    0 讨论(0)
  • 2020-12-25 12:20

    I had Shelved my changes in TFS and had a breakpoint set on a shelved cs file that was not part of the solution anymore. Once I retrieved my Shelveset, everything worked.

    0 讨论(0)
  • 2020-12-25 12:21

    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.

    0 讨论(0)
  • 2020-12-25 12:23

    Make sure that your compilation framework version is the same as your project's compilation framework.. I ran into this and it was because the project was being compiled as 4.5 and the compilation attrib in the web config was trying to debug it as 4.5.1.

    0 讨论(0)
提交回复
热议问题