Debug window functions

Debug window functions

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply

Do you find this useful?

Yes
4
67%
No
0
No votes
I don't know
0
No votes
Only if I get a beer
2
33%
I don't know english
0
No votes
 
Total votes: 6

User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Debug window functions

Post 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
IMSabbel
Posts: 747
Joined: 30 Jul 2005, 13:29

Post 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...) )
User avatar
Veylon
AI Developer
Posts: 174
Joined: 21 Sep 2005, 19:45

Post 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!
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post 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
Post Reply

Return to “AI”