Page 1 of 1

Debug window functions

Posted: 06 Oct 2005, 01:00
by jcnossen
I'm following cain's example and already release some stuff for the other AI developers:
These are a bunch of debug window functions that you can use to show debug info at runtime. In its very short existance it already helped me find this GetMetalIncome() bug I mentioned in the progress report :)

http://www.fileuniverse.com/?p=showitem&ID=1578

Posted: 07 Oct 2005, 03:11
by IMSabbel
as noone answers:
IMHO, there aint such a thing as not-useful debug information :)
(i still remember that one elusive crash where _one_ missing "." made a move shove 64kbyte data not into the framebuffer but into the stack ... (which was very final back then in win95 :D )
The code read absolutely correct, but runtime view of pointer/variable values showed it (after many hours of WTF...) )

Posted: 11 Oct 2005, 23:21
by Veylon
I had a problem where I omitted an underscore and cost myself an hour or so as so:

Code: Select all

MyClass::MyClass(int _a, int _b, int _c): a(_a), b(b), c(_c) {}
I took me longer than it should have to track down that b was being initialized to itself (zero) and not taking the value of the _b parameter as it should have and it didn't make an error because there was no illegal operation.

I've been making a bunch of action and condition classes to facilitate my poor scripting skills and didn't watch what I typed!

Posted: 12 Oct 2005, 00:34
by jcnossen
Yes those are horrible, the little typo's that look just fine when you quickly read them over and don't show up as compiler warning/error.
I end up putting my app full with debug macro's and other checking :S