You are looking at historical revision 17864 of this page. It may differ significantly from its current revision.

trace

Introduction

The extension provides traced execution of procedures and setting breakpoints on procedure entry.

This replaces the tracing facilities of CHICKEN versions prior to 4.2.12.

Requirements

advice, miscmacros

Documentation

trace

[procedure] (trace [PROCEDURE ...])

Modifies the given procedures by printing some information on entry and exit. When given no arguments, (trace) lists all currently traced procedures.

Note that PROCEDURE may be any procedure and doesn't necessarily have to be a toplevel definition.

untrace

[procedure] (untrace [PROCEDURE ...])

Removes tracing from PROCEDURE ..., which should previously have been traced with trace. When given no arguments, (untrace) removes untraces all currently traced procedures.

break

[procedure] (break [PROCEDURE ...])

Modifies the given procedures to signal a condition on entry. The condition is of the kinds exn and breakpoint and will terminate execution unless caught. In the interpreter, the condition is accessible on the toplevel using the ,exn command. Use (continue) to continue execution. If no arguments are given, (break) lists all procedures that currently have breakpoints set.

Note that PROCEDURE may be any procedure and doesn't necessarily have to be a toplevel definition.

unbreak

[procedure] (unbreak [PROCEDURE ...])

Removes breakpoints from the given procedures (or from all, if no arguments are given).

continue

[procedure] (continue [CONDITION])
[procedure] (c [CONDITION])

Continues execution from the breakpoint that signalled CONDITION, or from the last breakpoint if CONDITION is not given.

trace-output-port

[parameter] (trace-output-port [PORT])

Specifies the port to which tracing information should be written and defaults to the value of (current-output-port).

License

This code is placed into the public domain.

Version history

0.3
handles non-local exits correctly
0.2
fixed incorrect category
0.1
initial release