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

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

    I just had the exact same problem. What solved it for me was deleting the .suo files belonging to the solution that contained the affected project/source file.

    I also deleted my local symbolcache but I don't think that had anything to do with it.

    (My solution contains multiple projects, one file (DataAdapter.cs) in one project was affected by this (VisualStudio put my breakpoints in the pdb belonging to System.Data.DataAdapter). I opened the .csproj file directly and was able to correctly set the breakpoint.)

提交回复
热议问题