Difference between revisions of "Debugging ScummVM"

From ScummVM :: Wiki
Jump to navigation Jump to search
m (Minor corrections for spelling etc.)
(Added list of engines without Debug Console)
Line 16: Line 16:


Most of the ScummVM engines implement the debug console.<br>
Most of the ScummVM engines implement the debug console.<br>
The key combination to open this is CTRL-d (though this can be varied by engine if it conflicts with gameplay - See README).<br>
<br>
The exceptions are :<br>
[[Cine]], [[Draci]], [[Hugo]], [[MADE]], [[Sword1]], [[Sword25]], [[Toon]], [[Touche]] and [[Tucker]]<br>
<br>
The key combination to activate the debug console is CTRL-d <br>
(though this can be varied by engine if it conflicts with gameplay - See README).<br>
<br>
<br>
The default console provides the following default commands :<br>
The default console provides the following default commands :<br>

Revision as of 03:19, 7 November 2010

Debug Output

The functions in common/debug.* provide a basic debug output interface in a platform portable form.

The debuglevel is a global single integer which varies between -1 (minimum - default) and 11 (maximum).
This parameter indicates increasing verbosity of debug output, but does not separate by function.
This is set by passing the command line parameter, -d <int> to scummvm at runtime.

Debugflags (also known as Debug Channels) are booleans and are engine specific.
An engine can have up to 32 channels.
These can be set by passing the command line parameter, --debugflags=<flag1, flag2, ...> to scummvm at runtime.
They are generally preferred to just using debuglevel, since they allow separation of debug output into clearly named groupings and can be changed during runtime using the debug console.

Interactive Engine Debugging

Most of the ScummVM engines implement the debug console.

The exceptions are :
Cine, Draci, Hugo, MADE, Sword1, Sword25, Toon, Touche and Tucker

The key combination to activate the debug console is CTRL-d
(though this can be varied by engine if it conflicts with gameplay - See README).

The default console provides the following default commands :

  • help : Display the list of available commands
  • exit : Exit the debug console
  • debugflag_list : list the available debug flags and their status
  • debugflag_enable <debugflag> : enable a given debugflag
  • debugflag_disable <debugflag> : disable a given debugflag

This can be extended with further engine-specific commands.

TODO: Document commands for specific engines, or link to subpages in each engine for this.

TODO: Document debug flags/levels for the various ports.

Tips

  • To prevent SDL from catching segmentation faults (the SDL Parachute), add the following key to the configuration file under [scummvm]:
disable_sdl_parachute=true

or use command line switch

--disable-sdl-parachute

command line option.