开发者

Program execution ends suddenly, with no warnings or exceptions, ONLY when debugging!

开发者 https://www.devze.com 2023-03-23 13:12 出处:网络
I\'m having a very strange issue. My program runs absolutely perfectly if I run it without debugging (by pressing CTRL-F5), but if I try to run it with the debugger, it will crash back to the environm

I'm having a very strange issue. My program runs absolutely perfectly if I run it without debugging (by pressing CTRL-F5), but if I try to run it with the debugger, it will crash back to the environment with absolutely no warning, error message, or exception. In fact, according to the output window, the program exited with error code 0, ie, normally!

I've tried running the program on two computers, on one it works absolutely fine and lets me debug it, but on the other it doesn't. That just makes it even odder! I'm using visua开发者_运维技巧l c# express 2010.

Any help would be greatly appreciated!

Thanks a lot!


  1. Make sure have Exception enabled in VS.
  2. Make sure to be subscribed to AppDomain.UnhandledException

And you will got to your crash reason.

EDIT

How to enable exceptions in VS and VS Express

Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消