User Tools

Site Tools


jvs:cigal:manual:chapter4:debug

CIGAL Reference Manual, Chapter 4 (debug):

Debug -- Integer variable controlling printing of diagnostic messages

usage: debug = value

DEBUG is an internally defined integer variable whose value determines what type of diagnostic information is to be printed out while commands are executed. The value of the DEBUG parameter can be changed at any time and remains set until it is explicitly modified again (but see Note 3 below). The meaning of the different DEBUG settings are summarized below. Levels combine by adding values. The default setting for DEBUG is 0.

     VALUE
       1        Print each command during macro or menu execution
       2        Single step through a macro program (Note: 2 implies 1)
       4        Print compiler diagnostics
       8        Set diagnostic level 1
      16        Set diagnostic level 2
      24        Set diagnostic level 3
 (Settings below are normally disabled -- these are used for system debugging)
      32        Print graphics diagnostics
      64        Print image processor diagnostics
     128        Print I/O diagnostics
     256        Print parser diagnostics
     512        Print run-time diagnostics for variable processing
    1024        Print macro diagnostics
    2048        Print stack handling diagnostics
    4096        Print argument handling diagnostics
    8192        Check stack integrity after each command

The SINGLE-STEP feature (DEBUG flag 2) allows you to execute macro programs one line at a time. In this mode you will see the prompt:

       DEBUG>

after each command. If you enter a blank line, by typing <RETURN>, the program will proceed to execute the next command in the macro program. Any non-blank line is processed as a normal interactive command, just as though it appeared at that point within the macro. You can enter as many commands as you wish. Macro programs resume execution at the current location whenever you enter a blank line. You can turn off the SINGLE-STEP feature at any time by resetting the DEBUG parameter.

NOTES:

1. DEBUG settings 8, 16 and 24 have no predefined meaning. These are intended for use in debugging your own macro programs or menus by including statements like:

       if(debug >= 8) type 'current values are: ' ...

2. Keep in mind that any command entered in response to the “DEBUG>” prompt is treated as though it was part of the macro. In particular, you will find a few commands, such as HELP and JOURNAL, that behave differently when called from within a macro.

3. You can also change the value of DEBUG at any time – even in the middle of executing a command or macro – by typing <Control-D> (see KEYBOARD(1)). This is a special feature that bypasses CIGAL's normal command entering routines and only recognizes numbers (base 10); pressing any non-number key resumes execution at the point it was interrupted. This can be particularly useful for monitoring the progress of macro programs.

See Also:
KEYBOARD(1)

CIGAL Home, CIGAL Manual, List, Manual Help

jvs/cigal/manual/chapter4/debug.txt · Last modified: 2023/02/23 18:43 (external edit)