Computational State at the Time of an Error

DESCRIPTION:
Allows the user to browse in the function frames after an error has occurred.

USAGE:
debugger(data=last.dump)

OPTIONAL ARGUMENTS:
data:
list that describes the state of the computation at the time of the error. The attribute of data gives the character form of the calls. Each element of data is one frame (itself a list) of the execution stack at the time of the error.

SIDE EFFECTS:
The debugger function allows you to browse among the frames associated with the various calls. See documentation for browser to learn more about the interactive interface for debugger.

DETAILS:
The usual use of debugger is with the error option set to dump.frames, but the error option is generally dump.calls (which uses much less space). The examples section presents a typical use of debugger.

The inspect function now provides a more general interactive debugging environment, including browsing and tracing, together with most of the functionality of the debugger function.


SEE ALSO:
dump.calls , inspect , traceback , browser , restart .

EXAMPLES:
# an unobvious error occurs
old.options <- options(error=dump.frames, warn=1)
# now create the error again
# use the debugger possibly several times to track and fix the bug

debugger()

# after debugging, return error handling to normal options(old.options)