Debugging the release version of a program
来源:互联网 发布:2016淘宝金冠店铺排行 编辑:程序博客网 时间:2024/05/19 06:51
Something a lot of programmers don't know is that you can debug the release version of a program as easy as the debug version. I didn't know this until I've read John Robbins 'Bugslayer' column in the 'Microsoft System Journal', April 1998 (Vol 13, No 4):
In MSVC you can set all of your project's configurations in the Project Settings dialog.
1.Select the All Configurations option in the Settings For combobox.
2.On the C/C++ tab, select Program Database in the Debug info combobox.
3.On the Link tab, with the Category combobox on Debug, check the Debug info checkbox and the Microsoft format.
If you use your own make file use /Zi switch with CL.EXE and use the use the /DEBUG and /PDB:
That's all there is, now you can set breakpoints and watch variables as usual. Be aware that due to the optimizer not all symbols can be watch and the execution of the line may be in a different order!
A common error that affects only the release version of a program is when you use ASSERT instead of VERIFY. Remember ASSERTs will compile to nothing in a release version but VERIFY does. So if you call a function like ASSERT(DoSomething()) this function will not be called in the release version!
A release version of a program can behave different than the debug version due to optimzier settings. If you find a strange/buggy behavoir disable every optimazion and try again.
- Debugging the release version of a program
- Debugging a Program With dbx
- the process of developing a program
- Demo version of the real-time face detection program
- The Art of Debugging
- Surviving the Release Version
- Surviving the Release Version
- A function to retrieve the directory of a program
- you must have accepted the latest version of the IOS Developer Program Agreement
- A good program of the greedy snake game.
- Analyzing the heap(s) of a Win32 program
- The Program of Algorithms ------- Diveide and Conquer ---- Powering a number
- Fiddler2 - New Version of Fiddler Debugging Proxy
- The memory a program
- This program requires version 3.4.0 of the Protocol Buffer runtime library
- 错误Unable to start debugging. The Silverlight Developer Runtime is not installed. Please install a matching version.
- 错误Unable to start debugging. The Silverlight Developer Runtime is not installed. Please install a matching version
- The principles of program design
- 不要Google,要Stumble!
- 基础开发入门级:JSP与ASP的比较
- moderation-关于jive主题消息的审核机制
- css+html实现横纵表头锁定的表格
- 自验证文本框和Observer模式
- Debugging the release version of a program
- 透过汇编另眼看世界之类成员函数指针
- memccpy ( )【C语言库函数源代码】
- JAVA与C++的一点比较
- 变速齿轮”再研究-----(转帖)
- 连接MySQL并提供查询,删除,修改和添加的java程序
- 感言
- 事情的结果可能不是你想得到的,但是你应该得到的。
- 网络游戏外挂编写基础-------(转帖)