breakpoint will not currently be hit, why not?

2019-06-15 11:48发布

Sometimes I get the message that the breakpoint will not be hit, and no symbols will be loaded.

The red icon in vs.net changes color, and the debug mode just doesn't work.

what is the reason for this?

9条回答
叛逆
2楼-- · 2019-06-15 12:36

I do not like to play with knives but the only thing that worked for me involved editing the .csproj file itself. So, unload the project file, edit it by cutting and pasting the three asp.net files so that they are together in the ItemGroup. However, sometimes it is necessary to go further as explained here: http://carnotaurus.tumblr.com/post/4130422114/visual-studio-debugging-issue-with-files-of-the-same - Also, I give a list of other proposed solutions that did not work for me. I hope it helps.

查看更多
Deceive 欺骗
3楼-- · 2019-06-15 12:38

After trying several suggested fixes for this I did the following to get it working.

  1. Right Clicked my Project in the Solution Explorer and selected "Properties".
  2. Went to the "Web" section and made sure "Start Action" was set to "Current Page".

Spent 3 1/2 hours on that... I'm going to go get a drink now.

查看更多
祖国的老花朵
4楼-- · 2019-06-15 12:38

This can also happen if the debugger is not attached to the process for whatever reason. If it's the case, you can always go to Debug - Attach to Process... and choose the right process. Your breakpoints should return to normal once VS determines it can hit them.

查看更多
登录 后发表回答