11 4月 2010

solution of debugging console app with VS2005

Record this solution for constructing a debug version console app.
Especially useful for writing a simple OpenGL project.

//----------------------------------------------------------------//
(Forward)
Error Msg:
Debugging information for "YourProject.exe" cannot be found or does not match. Binary was not built with debug information.
Resolution:
To enable debugging:

1) Goto Project->HelloWorld Properties
2) On the left expand "Configuration Properties"
3) Expand "C/C++"
4) On the left, Select "General"
5) On the right, change "Debug Information Format" to "Program Database For Edit And Continue (/ZI)"
5) On the left, Select "Optimization"
6) On the right, change "Optimization" to "Disabled (/Od)"
7) On the left, expand "Linker"
8) On the left, select "Debugging"
9) On the right, change "Generate Debug Info" to "Yes"
10) Click ok
11) Set your breakpoints
12) Rebuild your application

沒有留言:

張貼留言