Dragonfly Q&A

Just a minor complaint: Please don't use GDB to debug programs in command line next time.

0 like 0 dislike
When we're using key inputs to activate certain events in the program, the last thing you would want to do is to use GDB in the terminal to debug the program that uses said terminal to poll inputs and displays the graphics.

It can cause conflicts with GDB by fighting over who has the better focus of the two.

 

I would certainly drop "using GDB in the terminal to debug NCurses" for an integrated development environment that debugs NCurses outside of the terminal, if there were any sorts of opportunities to do so.

 

And Eclipse CPP uses GDB to debug. But, it's not helpful when the Eclipse CPP couldn't inject itself into the terminal to debug, and I don't know why. GDB in terminal with pure command lines is like the opposite of heavens, when compared to other methods.

 

This course taught me the importance of having an IDE. It's very helpful and gave me the opportunity to see this in a new perspective.
asked Sep 21, 2014 in Other by tom_mai78101

1 Answer

0 like 0 dislike
Good insight.  

You are right that using a debugger for some game-type development can be problematic.  Specifically, as you mention, when the debugger is capturing input and you want your game to capture input, they may be incompatible.  Also, when the game is timing sensitve (and we know the game loop is), then debugger can slow down performance enough to matter and/or breakpoints can cause problems.

Hence, being able to debug via print messages is critical.  And since doing print message to a screen with a graphical display can be tricky (or impossible), you often need to rely upon the logfile.
answered Sep 21, 2014 by claypool
Perhaps you will start supporting PDcurses and Visual C++ in the near future? Being able to use PDcurses in a powerful IDE helps tremendously than the alternate GDB for catching inputs on the fly.

Even though relying on the logfile is another way of debugging, there are cases where logging the errors are much harder to do, such as the case when looking for logic errors while certain events are firing, and multiple objects sending/receiving events simultaneously, it can be much harder to track down by scrolling through tons of lines in the log file.
More information about Dragonfly can be found on the Dragonfly Home Page.
...