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

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

    I just backed up and deleted the file and then added back to the project, that solved the problem. I just whish i did it before going through the beforementioned list :)

    0 讨论(0)
  • 2020-12-14 00:55

    You may also try to Clean and Rebuild (not Build) all projects.

    0 讨论(0)
  • 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.

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