Debugging

From Bennu Wiki
(Redirected from Category:Debugging)
Jump to navigation Jump to search


Debugging a Bennu program can be tricky. So here are a few tips to get you on your way.

Debug mode

To run a game in debug mode, you have to import the debug module("mod_debug") and to compile the .prg with the -g option (e.g. bgdc.exe -g name.prg). Then when you run the game, it is in debug mode. In this there's a number of shortcuts, with a variety in usefulness.

Shortcuts

ALT-C - Show/hide the Bennu console.
ALT-F - Go into fullscreen mode.
ALT-G - Make a screenshot and save it as shotXXXX where XXXX is the lowest possible number.
ALT-P - Show/hide the Bennu profiler
ALT-R - Resets the profile history of the Bennu Profiler.
ALT-S - Activate/Deactivate the Bennu Profiler.
ALT-W - Go into window mode.
ALT-X - Exit.
ALT-Z - Switch the MODE_16BITS flag of graph_mode on/off.

Bennu Console

The Bennu console is a pretty handy debugging tool. You can view all active processes, view values of any variable, perform one instruction, perform one frame, manage breakpoints on processes, manage processes, etc. A sure go for debugging.

Bennu Profiler

The Bennu profiler is somewhat handy, mostly for tracing where a program is the most power hungry.


Debugging
DebuggingFenix consoleFenix profiler