How to make the release version of a visual studio 2008 c++ project so i can step in and debug?
-
there was a way to do it in vc 6...i forget how... the trouble i am having is the debug works fine but the release crashes. so i want to step into the release version.... it could be done in vc6...how to do it in vs2008? thanks!
You can debug a release version but the code tends to have been moved around a bit by the compiler. Make sure you're building with debug information (right click on project->settings, C++->general, debug information format set to program database) and then copy the PDB file to the directory you're running your code from. If it doesn't remove the bug try disabling optimisation as well - it makes debugging easier. Cheers, Ash
-
You can debug a release version but the code tends to have been moved around a bit by the compiler. Make sure you're building with debug information (right click on project->settings, C++->general, debug information format set to program database) and then copy the PDB file to the directory you're running your code from. If it doesn't remove the bug try disabling optimisation as well - it makes debugging easier. Cheers, Ash
thank you Ash! I did what you said... Make sure you're building with debug information (right click on project->settings, C++->general, debug information format set to program database) then I set a breakpoint in the release version of the code (in the IDE) and ran it expecting it to stop at the breakpoint. But it did not and the breakpoint did not look colored anymore. It just ran on and crashed. I would like the code to stop executing at the breakpoint so I can step in and proceed line by line. thanks!
-
there was a way to do it in vc 6...i forget how... the trouble i am having is the debug works fine but the release crashes. so i want to step into the release version.... it could be done in vc6...how to do it in vs2008? thanks!
You may find these interesting: Surviving the Release Version[^] Debugging Release Mode Problems[^] :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
-
thank you Ash! I did what you said... Make sure you're building with debug information (right click on project->settings, C++->general, debug information format set to program database) then I set a breakpoint in the release version of the code (in the IDE) and ran it expecting it to stop at the breakpoint. But it did not and the breakpoint did not look colored anymore. It just ran on and crashed. I would like the code to stop executing at the breakpoint so I can step in and proceed line by line. thanks!
In addition, that Ash said, please check the following :) : - C++\Optimization: NO - Linker\GenerateDebugInformation: YES
They sought it with thimbles, they sought it with care; They pursued it with forks and hope; They threatened its life with a railway-share; They charmed it with smiles and soap. :)
-
In addition, that Ash said, please check the following :) : - C++\Optimization: NO - Linker\GenerateDebugInformation: YES
They sought it with thimbles, they sought it with care; They pursued it with forks and hope; They threatened its life with a railway-share; They charmed it with smiles and soap. :)
Eugen Podsypalnikov wrote:
- C++\Optimization: NO
Generally, you go to the trouble of debugging a release version because the debug version is working and you want to see why optimizations are screwing up the release version. If you turn off optimizations, you have the debug version.
Once you agree to clans, tribes, governments...you've opted for socialism. The rest is just details.
-
Eugen Podsypalnikov wrote:
- C++\Optimization: NO
Generally, you go to the trouble of debugging a release version because the debug version is working and you want to see why optimizations are screwing up the release version. If you turn off optimizations, you have the debug version.
Once you agree to clans, tribes, governments...you've opted for socialism. The rest is just details.
Wow... :) Thank you !
They sought it with thimbles, they sought it with care; They pursued it with forks and hope; They threatened its life with a railway-share; They charmed it with smiles and soap. :)
-
In addition, that Ash said, please check the following :) : - C++\Optimization: NO - Linker\GenerateDebugInformation: YES
They sought it with thimbles, they sought it with care; They pursued it with forks and hope; They threatened its life with a railway-share; They charmed it with smiles and soap. :)
-
You may find these interesting: Surviving the Release Version[^] Debugging Release Mode Problems[^] :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
-
you're welcome. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.