简体   繁体   中英

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

I am using Visual Studio Community 2015, and vstools for unity.
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.

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. 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.

I have no idea what caused it, or even whether it's VS, VStools, or unity.

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.

Right click on Visual Studio icon -> Run as administrator

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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