简体   繁体   English

Visual Studio 2015调试错误“无法执行,一般异常”

[英]visual studio 2015 debug error “unable to step, general exception”

I am using Visual Studio Community 2015, and vstools for unity. 我正在使用Visual Studio Community 2015和vstools来实现统一。
I am currently trying to debug an error in my code, but when I reach the breakpoint, Visual Studio displays an error box "Unable to step. General Exception" with no more information. 我目前正在尝试调试代码中的错误,但是当我到达断点时,Visual Studio将显示错误框"Unable to step. General Exception" ,没有更多信息。

When I click "ok" and try to step again, the yellow position arrow just disappears, leaving me with no way to watch the code evolving. 当我单击“确定”并尝试再次执行操作时,黄色位置箭头仅消失了,使我无法观看代码的演变。 This seemingly cuts the execution since unity stays frozen as if I was debugging. 这似乎降低了执行效率,因为unity像我调试时一样保持冻结状态。 Hitting the pause button just sends me another error telling me no thread is running. 按下暂停按钮只会向我发送另一个错误,告诉我没有线程正在运行。 The only way to stop this is to leave the VS debug mode, which reenables the unity window, but that makes me unable to debug my code. 停止此操作的唯一方法是退出VS调试模式,该模式可重新启用unity窗口,但这使我无法调试代码。

I have no idea what caused it, or even whether it's VS, VStools, or unity. 我不知道是什么原因造成的,甚至不知道是VS,VStools还是团结。

It gets stuck on the following code: 它卡在以下代码中:

string filename = "Saves and Config/Save_" + file; // breakpoint here
byte[] loaded = File.ReadAllBytes(filename);
Assets.Scripts.playerdata.loadedfromsave = true;
Assets.Scripts.playerdata.load(loaded, 0);
Assets.Scripts.questStuff.keyQuest.load(loaded, 5);

(by the way, the file does exist) (顺便说一下,该文件确实存在)

Try to run Visual Studio as administrator. 尝试以管理员身份运行Visual Studio。

Right click on Visual Studio icon -> Run as administrator 右键单击Visual Studio图标->以管理员身份运行

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

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