开发者

How to find where program crashed

I have a program that crashes (attempting to read a bad memory address) while running the "release" version but does not 开发者_开发技巧report any problems while running the "debug" version in the visual studio debugger.

When the program crashes the OS asks if I'd like to open up the debugger, and if I say yes then I see an arrow pointing to where I am in a listing of some assembler which I am not skilled enough to read properly (I learned 6502 assembler 30 years ago). Is there any way for my to determine where in my sourcecode the offending memory read was located?


You need to build your program with Debug info enabled (which you can do even for release builds) and that debug info (*.pdb files) must be accessible to the debugger (just copy it beside the executable).
The VS should be able to show you the source, stack and everything else.


Just want to add one point apart from what sbi has told you. There are Microsoft Debugging Tools for Windows. This package contains a good book "Debugging Help". Even if you are not going to use WinDbg to analyze crashes you might find reading the "Debugging Help" quite useful.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜