Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: Zingam on February 23, 2006, 10:00:50 pm

Title: Debugging without a debugger?
Post by: Zingam on February 23, 2006, 10:00:50 pm
How do one debug complex programs without an access to a debugger, especially full-screen graphic applications? Any suggestions, articles or books?
Title: Re: Debugging without a debugger?
Post by: thomas on February 23, 2006, 10:08:25 pm
I use two displays for that.

As a cheaper alternative, you can of always write info to a log file, or show message boxes, but that is not debugging...
Title: Re: Debugging without a debugger?
Post by: takeshimiya on February 23, 2006, 11:49:21 pm
Or another way is to write text over the image surfaces.
Title: Re: Debugging without a debugger?
Post by: GLfoat on February 24, 2006, 12:18:18 am
Hello Takesi
you have a lot experience in debugging, can you please post a project here where you demonstrate this technic ?
i would be wery interessted in that technique, please help me to learn how to do i so
thanks, thanks a lot,
i look forward to hear from you !!!!
Title: Re: Debugging without a debugger?
Post by: takeshimiya on February 24, 2006, 01:09:58 am
Hello Takesi
you have a lot experience in debugging, can you please post a project here where you demonstrate this technic ?
i would be wery interessted in that technique, please help me to learn how to do i so
thanks, thanks a lot,
i look forward to hear from you !!!!

Sorry, what I was suggesting to write text (as textures or whatever) but it would really depend on the graphics system or library you're using.
If you're using a high-level library, most of them includes a printf()-like function for that. If not, you'd have to create it yourself.
If you're using OpenGL directly (as I can guess from your nickname :D), you'd need to use something like this (http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=13) or this (http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=43).
Title: Re: Debugging without a debugger?
Post by: GLfoat on February 24, 2006, 01:41:42 am
Hello Takesi
you have a lot experience in debugging, can you please post a project here where you demonstrate this technic ?
i would be wery interessted in that technique, please help me to learn how to do i so
thanks, thanks a lot,
i look forward to hear from you !!!!

Sorry, what I was suggesting to write text (as textures or whatever) but it would really depend on the graphics system or library you're using.
If you're using a high-level library, most of them includes a printf()-like function for that. If not, you'd have to create it yourself.
If you're using OpenGL directly (as I can guess from your nickname :D), you'd need to use something like this (http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=13) or this (http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=43).

Mon friend Takesi !

thank you a lot for tis url of nehe projet 13, and it do works greately !!!!11
i have my graphique texte now on my screen !!!!1
but how do i shift the output from this projet to the graphique of my programm i do want to do debugge ???
i do not have a graphique on my programm until just.
how do i get the graphique in my programm ???
so that i can look at tzhe debugge text ?
i do thanke you so much for the very helpfull texte you sent moi,
thanks you , thanks you again, meilleur times !!!!1



Title: Re: Debugging without a debugger?
Post by: takeshimiya on February 24, 2006, 03:22:25 am
thank you a lot for tis url of nehe projet 13, and it do works greately !!!!11
i have my graphique texte now on my screen !!!!1
but how do i shift the output from this projet to the graphique of my programm i do want to do debugge ???
i do not have a graphique on my programm until just.
how do i get the graphique in my programm ???
so that i can look at tzhe debugge text ?
i do thanke you so much for the very helpfull texte you sent moi,
thanks you , thanks you again, meilleur times !!!!1

I'm not quite sure I understand what you said, but I think you'd need to mix the code from NeHe into your own code, and that depends on the code of your program. Tipically you would call your glPrint() on each frame after you've drawn everything else.

But if you find that this not easy, give "write info to a log file" a shot.