OOF2: The Manual

Name

OOF.Help.Debug.Debug — Turn debugging mode on and off.

Synopsis

OOF.Help.Debug.Debug(boolean)

Details

  • Parent Menu: OOF.Help.Debug
  • Callback: function set_debug in module ooflib.common.IO.mainmenu
  • Parameters:

    boolean
    A boolean value, 0 (false) or 1 (true). This is not a keyword parameter (just enter '0' or '1', not 'boolean=1').

Description

Calling this command with an argument of 1 turns debugging mode on. Calling with with an argument of 0 turns it off. In debugging mode, menu commands and other debugging information is echoed to terminal from which OOF2 was launched.

Debugging mode can also be turned on by providing the --debug command line argument. Doing it this way initializes the random number generator with a special seed (17, the most random integer) and adds a few more testing commands to the OOF.Help.Debug menu. Initializing the random number is done to ensure that program behavior is deterministic in debug mode. The extra commands are undocumented.

Echoed commands look like this:

      -10013-2003--------------- ====40027==== 5OOF.Skeleton.New(name='bones', ...))
    

1

The stack depth of the Python interpreter.

2

The thread that the command is running on.

3

The number of dashes is the same as the stack depth, to make it easier to recognized nested routines.

4

The sequence number of the command.

5

The menu command itself.

Other debugging output has the form:

      -10004-2023------ 4mainmenu.py5(115):6loaddata 7done loading oofdata.py
    

1

The stack depth of the Python interpreter.

2

The thread that is printing the message.

3

A number of dashes equal to the stack depth.

4

The file containing the code containing the debugging line.

5

The location within the file of the debugging line.

6

The function containing the debugging line.

7

The debugging message itself.