Previous: , Up: Programmatic Error Handling   [Contents][Index]


6.27.3.5 Debug options

The behavior of the backtrace procedure and of the default error handler can be parameterized via the debug options.

Scheme Procedure: debug-options [setting]

Display the current settings of the debug options. If setting is omitted, only a short form of the current read options is printed. Otherwise if setting is the symbol help, a complete options description is displayed.

The set of available options, and their default values, may be had by invoking debug-options at the prompt.

scheme@(guile-user)>
backwards       no      Display backtrace in anti-chronological order.
width           79      Maximal width of backtrace.
depth           20      Maximal length of printed backtrace.
backtrace       yes     Show backtrace on error.
stack           1048576 Stack size limit (measured in words;
                        0 = no check). 
show-file-name  #t      Show file names and line numbers in backtraces
                        when not `#f'.  A value of `base' displays only
                        base names, while `#t' displays full names. 
warn-deprecated no      Warn when deprecated features are used.

The boolean options may be toggled with debug-enable and debug-disable. The non-boolean options must be set using debug-set!.

Scheme Procedure: debug-enable option-name
Scheme Procedure: debug-disable option-name
Scheme Syntax: debug-set! option-name value

Modify the debug options. debug-enable should be used with boolean options and switches them on, debug-disable switches them off.

debug-set! can be used to set an option to a specific value. Due to historical oddities, it is a macro that expects an unquoted option name.