tags:

views:

25

answers:

3
+1  Q: 

Debugging in vc++

I have an exe get crashed in release mode.i want to debug where the crashing has occurred ?.how will use in vc++ to analyse this crashing using release mode exe

A: 

Firstly if you have access to the code you can open the workspace in visual studion and debug it by pressing F5 button.

Secondly go through the steps that leads to the crash. At that point of time check the location pointed to by the call stack.

This will give you indication on the funciton or line where crash is occuring.

We are assuming this application was written in VC++. How often are you able to reproduce this issue. Is it like everytime you can reproduce it or how is it.

ckv
I just meant Visual Studion unknowningly i wrote 6.0 also sorry shall edit the answer.
ckv
A: 

You can build a "Release" build with the /DEBUG linker flag set; this will cause a .pdb to be generated for the application. Then, it's simply a matter of running attached to the debugger like you would with a debug build.

Note that in an optimized build, debugging symbols are often incorrect or can lead to very confusing behavior and information when debugging because there is no simple correspondence between lines of C++ code and the machine code. It is much trickier and far more frustrating to debug an optimized build. I wish you luck.

James McNellis
A: 

You can run Visual Studio and attach it to a process to debug. Also check through the Windows Event Viewer (an often overlooked source of information) for any exceptions that Windows may have caught.

ChrisBD