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

后端 未结 15 2288
刺人心
刺人心 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:56

    I had a similar issue with the breakpoint being set in another file with the same filename in a different project.

    It was caused by the fact that the debugging was started for that other project, while it was not started for the project where I tried to set the breakpoint. The breakpoint creation worked correctly after doing the Debug > Start New Instance for the intended project.

提交回复
热议问题