简体   繁体   English

无法在 Visual Studio 中调试

[英]Cannot Debug In Visual Studio

I have just a form in my VB.Net project and even when I try debugging that - there is nothing going on besides the form being loaded - I get the error:我的 VB.Net 项目中只有一个表单,即使我尝试调试它 - 除了正在加载的表单之外什么都没有发生 - 我收到错误:

No symbols are loaded for any call stack frame.没有为任何调用堆栈帧加载符号。 The source code cannot be displayed.无法显示源代码。

I've tried using this solution from StackOverflow , but this is either oudated or pertains only to C++.我试过使用StackOverflow 的这个解决方案,但这要么是过时的,要么只适用于 C++。 I've also tried using this article from the MSDN Forum , however, this also did not seem to help as I wasn't quite sure what the answer was telling me to do.我也尝试过使用MSDN 论坛中的这篇文章,但是,这似乎也没有帮助,因为我不太确定答案告诉我该怎么做。

Has anybody else came across this problem and found a solution?有没有其他人遇到过这个问题并找到了解决方案? It's very frustrating that I'm receiving this error and I only have a form showing up.收到此错误消息非常令人沮丧,而且我只显示了一个表格。

Edit: I found another solution here but I don't quite know what that means... yet.编辑:我在这里找到了另一种解决方案,但我不太清楚这意味着什么......但是。 I was going to look into this but I'd really like to know why this doesn't work when Application Framework is enabled.我打算对此进行研究,但我真的很想知道为什么在启用应用程序框架时这不起作用。

Make sure you are running in debug and not release.确保您在调试中运行而不是发布。 Build>Configuration Manager>Active Solution Configuration = Debug

Get rid of all compiler warnings/errors and rebuild.摆脱所有编译器警告/错误并重建。 Look at your Sub New() and form_load events closely.仔细查看您的 Sub New() 和 form_load 事件。 Dodgy form inheritance can cause this.狡猾的形式 inheritance 可能会导致此问题。 Dodgy module level vars also.狡猾的模块级变量也。 From memory even when you fix the problem you need to rebuild to get the designer back.从 memory 开始,即使您解决了问题,您也需要重新构建以让设计人员回来。 Might be a my.Settings issue.可能是 my.Settings 问题。

Sorry for imprecise advice, I have had this problem before but I cannot remember the details.抱歉建议不准确,我以前遇到过这个问题,但我不记得细节了。

A quick workaround is to just uncheck "Enable unmanaged code debugging" and "Enable the Visual Studio hosting process" in the Debug section of the Project Properties.一个快速的解决方法是在项目属性的调试部分取消选中“启用非托管代码调试”和“启用 Visual Studio 托管进程”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM