Debug Console?!
-
WanabeCoder
- Kobold
- Posts: 26
- Joined: Sun Jan 09, 2005 11:04 pm
Debug Console?!
Erm.. how can I debug my program if I can't compile it? >.>
(visual c++ 6.0 std)
(visual c++ 6.0 std)
-
monster
- OGRE Community Helper

- Posts: 1098
- Joined: Mon Sep 22, 2003 2:40 am
- Location: Melbourne, Australia
-
WanabeCoder
- Kobold
- Posts: 26
- Joined: Sun Jan 09, 2005 11:04 pm
-
monster
- OGRE Community Helper

- Posts: 1098
- Joined: Mon Sep 22, 2003 2:40 am
- Location: Melbourne, Australia
-
haffax
- OGRE Retired Moderator

- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 8
Don't make uneducated guesses about Linux' abilities. Debugging Ogre and programs using it, is much, much easier and more comfortable under Windows.
Your problem is probably VC6, a seven year old IDE/compiler. Compare it with the tools you had in Linux seven years ago.
Go buy a new one, like VC.Net2003 or wait for VC.Net2005.
Your problem is probably VC6, a seven year old IDE/compiler. Compare it with the tools you had in Linux seven years ago.
Go buy a new one, like VC.Net2003 or wait for VC.Net2005.
-
Kojack
- OGRE Moderator

- Posts: 7157
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 538
If your program compiles, that just means that the compiler could compile your code (no syntax errors), it doesn't mean that the end result will do what you want.
Debugging is fixing flaws in a program which cause it to run incorrectly (wrong results, memory leaks, crashes, etc).
Been a while since I've had VC6 installed, but it should be possible to add the /Zm option to the project properties (I'm positive it had an "Additional Options" text box like VS.Net does).
What's really fun is debugging a program on a freaky OS, with a crappy compiler, with no debugger, when the bug is that the program suddenly dies after around 40 hours of continuous running.
Stress*=1000.0f;
Debugging is fixing flaws in a program which cause it to run incorrectly (wrong results, memory leaks, crashes, etc).
Been a while since I've had VC6 installed, but it should be possible to add the /Zm option to the project properties (I'm positive it had an "Additional Options" text box like VS.Net does).
What's really fun is debugging a program on a freaky OS, with a crappy compiler, with no debugger, when the bug is that the program suddenly dies after around 40 hours of continuous running.
Stress*=1000.0f;
-
:wumpus:
- OGRE Retired Team Member

- Posts: 3067
- Joined: Tue Feb 10, 2004 12:53 pm
- Location: The Netherlands
- x 1
-
AssiDragon
- Greenskin
- Posts: 145
- Joined: Wed Apr 28, 2004 12:10 pm
- Location: Hungary
-
monster
- OGRE Community Helper

- Posts: 1098
- Joined: Mon Sep 22, 2003 2:40 am
- Location: Melbourne, Australia
-
haffax
- OGRE Retired Moderator

- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 8
-
monster
- OGRE Community Helper

- Posts: 1098
- Joined: Mon Sep 22, 2003 2:40 am
- Location: Melbourne, Australia
-
Kojack
- OGRE Moderator

- Posts: 7157
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 538
A few times recently I've encountered bugs which don't occur in release, don't occur in an F5 run in debug mode, but crash the game every time in a Ctrl-F5 run in debug mode. Tricky, since an F5 run is the one that shows you where errors occur. 
When freaky stuff like that happens, first thing I tell the students to do is Rebuild All.
You'd be surprised (or not) how many times that fixes bugs (especially things like stack corruptions or when single stepping jumps around in abnormal ways), Visual Studio tends to forget to recompile files which need to recompiled.
The main thing to remember between debug and release runs is that in debug, all allocated memory is filled with special values, but in release mode it's just got whatever was already there in memory (ie. random stuff).
When freaky stuff like that happens, first thing I tell the students to do is Rebuild All.
The main thing to remember between debug and release runs is that in debug, all allocated memory is filled with special values, but in release mode it's just got whatever was already there in memory (ie. random stuff).
-
alphabeta
- Kobold
- Posts: 34
- Joined: Mon Jan 03, 2005 5:07 am
Debugging is just the act of going step by step through a program to find what's causing a problem, which obviously can't happen if the program won't compile (much less run)
Look at the errors your compiler throws at you. Try vs2005 betas if you need a new ide, but keep in mind with visual studio, the ide has ABSOLUTELY NO IDEA about the real importance of errors. It's prioritization will lead you in loops, so take a look at the order in the output window once in a while (fixing the first error might fix all 165
)
Look at the errors your compiler throws at you. Try vs2005 betas if you need a new ide, but keep in mind with visual studio, the ide has ABSOLUTELY NO IDEA about the real importance of errors. It's prioritization will lead you in loops, so take a look at the order in the output window once in a while (fixing the first error might fix all 165
-
epopov
- Halfling
- Posts: 85
- Joined: Tue Jun 10, 2003 2:57 pm
Yes you can, you just have to enable the building of .pdb files (one option to check on the C++ tab and another in the link tab, I think).monster wrote:MSVC's difference between debug and release modes; bugs you don't see in debug do appear in release, but obviously then you can't debug them, arrrgh!
It's not as easy as in debug mode to debug in release mode because of some optimisations performed by the compiler that can reorder lines or group several source lines in one 'assembly block', but having the source code at hand is definitively better than dealing with the raw assembly !
-
zarthrag
- Greenskin
- Posts: 128
- Joined: Sat Jul 24, 2004 9:07 am
- Location: Tulsa, Oklahoma