Visual Studio breakpoints break in the wrong source file (or multiple files simultaneously) if multiple files have the same name

后端 未结 15 2315
刺人心
刺人心 2020-12-14 00:09

In a team project I\'m working on, setting a breakpoint in a file (say IdeasController.cs) will lead to erratic debugger behaviour if there\'s another file with

15条回答
  •  没有蜡笔的小新
    2020-12-14 00:43

    If no better alternatives exist, you could put the breakpoint in code:

    System.Diagnostics.Debugger.Break();
    

    Just don't forget to remove it afterwards...

提交回复
热议问题