Debugging from outside of the Visual Studio environment
Heya,
I'm currently using Visual Studio. Generally, when I want to debug, I just run it in debug mode from inside VS (using F5). However, I have a situation now where I'm getting an unhandled exception, and I absolutely cannot run the program from within Visual Studio. I heard that you can run a debug build outside of Visual Studio and then have it prompt you to debug when the exception occurs. Is this true? How does this work?
I found some instructions on the web for attaching the VS debugger to a program that is running, but that takes time, and my exception occurs a split second after the program is run. I found instructions on MSDN for creating an EXE project, but it looks like that requires running the executable from inside Visual Studio.
^ Haha.
So, here's what happened. I ran my application this morning (compiled in Release mode with no debugging information) and when an exception occurred, I got a dialog box asking me what program I would like to use for debugging. However, since this wasn't a debug build, the call stack & the watch gave me limited information (that probably wasn't reliable anyway; incidentally, I heard that if you're really clever, you can do some debugging in release mode, but it's a lost art; if anyone has any information on this that they can throw my way, it'd be much appreciated; I'm guessing it just has to do with looking at the disassembly and interpreting it, which I guess would require knowing assembly pretty well; I know some basic MIPS and that's it).
Anyway, now I've got the debug build, and I go to run it, and the exception occurs, and I get a different dialog box this time. It's the one that usually pops up within the Visual Studio environment that says "Abort/Retry/Ignore" and it says to select "Retry" if I want to debug. Only problem is, if I select "Retry", Visual Studio doesn't come up. Nothing happens, in fact.
grr.
So, here's what happened. I ran my application this morning (compiled in Release mode with no debugging information) and when an exception occurred, I got a dialog box asking me what program I would like to use for debugging. However, since this wasn't a debug build, the call stack & the watch gave me limited information (that probably wasn't reliable anyway; incidentally, I heard that if you're really clever, you can do some debugging in release mode, but it's a lost art; if anyone has any information on this that they can throw my way, it'd be much appreciated; I'm guessing it just has to do with looking at the disassembly and interpreting it, which I guess would require knowing assembly pretty well; I know some basic MIPS and that's it).
Anyway, now I've got the debug build, and I go to run it, and the exception occurs, and I get a different dialog box this time. It's the one that usually pops up within the Visual Studio environment that says "Abort/Retry/Ignore" and it says to select "Retry" if I want to debug. Only problem is, if I select "Retry", Visual Studio doesn't come up. Nothing happens, in fact.
grr.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement