Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
Debug module overview

Overview

The Debug module contains all functions necessary to perform debugging related tasks, e.g. checking assertions or logging.

Logging

Logging can be sent to a number of different locations:

  • a flat log file
  • a console window
  • a debugger via OutputDebugString
  • to a remote program (via a named pipe)
  • to a number of separated log files

By default logging is enabled to the flat log file.

Commands

The debug module is controlled via extendable commands. Commands are typically put into logical groups. A command can then be executed in a number of ways:

  • group.command <param> (explicitly specifies which group to use)
  • command <param> (assumes that the command resides in the same group as the previous one)
  • group. (switches the current group)

Every group has to respond to the command 'help'.

See also: Debug commands

.dbgcmd file

On startup the debug module tries to open a file called <exe>.dbgcmd - if found then all lines in this module are directly interpreted as commands. If the file is not found then default.dbgcmd is tried instead. This allows for setting up a default environment.