visual-studio 无法在 Visual Studio 2013 中加载一个或多个断点错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1152027/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 10:47:12  来源:igfitidea点击:

Unable to load one or more breakpoints error in Visual Studio 2013

visual-studiodebuggingbreakpoints

提问by Embedd_Khurja

My Visual Studio is behaving strangely. I have no breakpoints in my projects but whenever I start Visual Studio, an error message comes up showing that it's unable to load one or more breakpoints. Secondly, I have 10 projects in my solution - I set one as a startup project but Visual studio is not saving this information. I have to set it every time I open the solution.

我的 Visual Studio 表现得很奇怪。我的项目中没有断点,但是每当我启动 Visual Studio 时,都会出现一条错误消息,表明它无法加载一个或多个断点。其次,我的解决方案中有 10 个项目 - 我将一个项目设置为启动项目,但 Visual Studio 没有保存此信息。我每次打开解决方案时都必须设置它。

回答by sbi

Re the breakpoint problem: Have you debugged into assembler? You might have accidentally set a breakpoint on some assembler instruction. Look into the breakpoint list (Debug->Windows->Breakpoints; it's Alt+F9 for me) to see which breakpoints are set for the solution. Of course, source and binary not matching might also cause this. Alternatively the following might help, too.

再断点问题:你有没有调试成汇编程序?您可能不小心在某些汇编指令上设置了断点。查看断点列表(Debug->Windows->Breakpoints;对我来说是 Alt+F9)以查看为解决方案设置了哪些断点。当然,源和二进制不匹配也可能导致这种情况。或者,以下内容也可能有所帮助。

Re the startup project: Visual Studio saves all user-specific data regarding a solution in a *.suofile which it puts right beside the *.slnfile. This might have gotten corrupted (although I've never seen this). Try to delete it and see whether this helps. On a second thought, both problems might be caused by someone having checked in the *.suofile located in a hidden .vsdirectory. Have you checked this?

重新启动项目:Visual Studio 将有关解决方案的所有用户特定数据保存在一个*.suo文件中,该*.sln文件放在文件旁边。这可能已损坏(尽管我从未见过)。尝试删除它,看看这是否有帮助。再想一想,这两个问题都可能是由于有人签入了*.suo位于隐藏.vs目录中的文件所致。你检查过这个吗?

回答by bnPYSse

I also encountered such a problem, the solutions is delete the *.suo file in the solution directory.

我也遇到过这样的问题,解决办法是删除solution目录下的*.suo文件。

回答by Javad

I had the same issue and I cleaned the solution from BUILD>CLEAN SOLUTION and rebuilt the solution and it resolved.

我遇到了同样的问题,我从 BUILD>CLEAN SOLUTION 中清理了解决方案,并重建了解决方案并解决了。

回答by bubuka

Deleting *.suo file worked for me

删除 *.suo 文件对我有用

回答by JaredPar

Can you give us more information on why Visual Studio can't load the break point? If you hover over the breakpoint icon it should provide a tooltip message saying why the breakpoint is unable to load.

你能给我们更多关于为什么 Visual Studio 无法加载断点的信息吗?如果您将鼠标悬停在断点图标上,它应该提供一条工具提示消息,说明无法加载断点的原因。

The most common reason for this is a mismatch between the source file and the binary you are debugging. It can happen if you F5 with build errors for instance. Or F5 against a deployed DLL after you have changed the source for the DLL. Try rebuilding and potentially redeploying as appropriate and see if that helps your problem.

最常见的原因是源文件和您正在调试的二进制文件之间不匹配。例如,如果您 F5 出现构建错误,就会发生这种情况。或者在更改 DLL 的源之后针对已部署的 DLL 使用 F5。尝试重建并可能酌情重新部署,看看这是否对您的问题有帮助。

As for the startup information. Try updating it, hitting save all and restarting Visual Studio. That should ensure the information is saved.

至于启动信息。尝试更新它,点击全部保存并重新启动 Visual Studio。这应该确保信息被保存。

回答by Ahmet Kak?c?

There may be an breakpoint that disappered (but how?). Please try Ctrl+Shift+F9 to 'Delete All Breakpoints' (VS2008).

可能有一个断点消失了(但如何?)。请尝试 Ctrl+Shift+F9 来“删除所有断点”(VS2008)。

回答by Flo

Deleting .suofile did not work for me, neither did deleting objfolder. Only thing that worked was deleting everything from hidden .vsfolder (I moved the files somewhere else on my machine first to make sure I could move them back in case of an error)

删除.suo文件对我不起作用,删除文件夹也不起作用obj。唯一有效的是删除隐藏.vs文件夹中的所有内容(我首先将文件移动到我机器上的其他位置,以确保在出现错误时可以将它们移回)

回答by Talel

I tried to delete all breakpoints but every time I opened the project this message appeared.

我试图删除所有断点,但每次打开项目时都会出现此消息。

I have found a hidden directory inside the solution: ".vs"

我在解决方案中找到了一个隐藏目录:“.vs”

I renamed it to something else and re-opened the solution - the message disappeared.

我将其重命名为其他内容并重新打开解决方案 - 消息消失了。

回答by BSalita

I just had this issue with Visual Studio 2012 RC. I fixed it by setting a arbitrary breakpoint and then deleting it in the Debug->Windows->Breakpoint window.

我刚刚在 Visual Studio 2012 RC 上遇到了这个问题。我通过设置任意断点然后在 Debug->Windows->Breakpoint 窗口中删除它来修复它。

回答by Daniel Fisher lennybacon

Ctrl+Shift+F9 to 'Delete All Breakpoints' does not work.

Ctrl+Shift+F9 到“删除所有断点”不起作用。

Delete everything in your project which is not your source code: "obj" and "bin" sub-directories, all *.user and *.suo also from the hidden ".vs" directory.

删除项目中不是源代码的所有内容:“obj”和“bin”子目录,所有 *.user 和 *.suo 也来自隐藏的“.vs”目录。