-
August 3rd, 2007, 08:12 AM
#1
Debug Tricks/Methods
All: How do you deal with debugging code that doesn't exhibit the bug when compiled in debug mode.
I have had to deal with this scenario atleast once a year for quite awhile now. A bug is reported in the production software. You can't reproduce it when the software is compiled in debug mode. The only way to reproduce it is to compile in release mode.
One of the things I do - and I am sure everyone does - is to start putting printf's or cout's in the code. However, I have also had to deal with putting a printf in the code and then the bug disappears or moves to a different location.
John 3:16
For God so loved the world ...
-
August 3rd, 2007, 09:03 AM
#2
Re: Debug Tricks/Methods
If it is seen with release mode, try enabling the Program Database and Debug Info for the release mode (in project settings C++->General->Program Database & Linker->Debug information).
If that does not help, then try using log files. Map file will also be a good idea.
Following articles might help,
Surviving the Release Version
Debugging Release Mode Problems
BTW, this being a technical question, you should have posted it in VC++ forum.
Regards,
Ramkrishna Pawar
-
August 3rd, 2007, 09:05 AM
#3
Re: Debug Tricks/Methods
Originally Posted by kenrus
One of the things I do - and I am sure everyone does - is to start putting printf's or cout's in the code. However, I have also had to deal with putting a printf in the code and then the bug disappears or moves to a different location.
This is a classic heap corruption case, there could be memory leaks problem too.
Regards,
Ramkrishna Pawar
-
August 3rd, 2007, 10:08 AM
#4
Re: Debug Tricks/Methods
Originally Posted by Krishnaa
If it is seen with release mode, try enabling the Program Database and Debug Info for the release mode (in project settings C++->General->Program Database & Linker->Debug information).
If that does not help, then try using log files. Map file will also be a good idea.
Following articles might help,
Surviving the Release Version
Debugging Release Mode Problems
BTW, this being a technical question, you should have posted it in VC++ forum.
Thanks for the links. That information will prove useful.
Kendall
John 3:16
For God so loved the world ...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|