FreeMat
|
Section: Debugging FreeMat Code
The dbauto functionality in FreeMat allows you to debug your FreeMat programs. When dbauto
is on
, then any error that occurs while the program is running causes FreeMat to stop execution at that point and return you to the command line (just as if you had placed a keyboard
command there). You can then examine variables, modify them, and resume execution using return
. Alternately, you can exit out of all running routines via a retall
statement. Note that errors that occur inside of try
/catch
blocks do not (by design) cause auto breakpoints. The dbauto
function toggles the dbauto state of FreeMat. The syntax for its use is
dbauto(state)
where state
is either
dbauto('on')
to activate dbauto, or
dbauto('off')
to deactivate dbauto. Alternately, you can use FreeMat's string-syntax equivalence and enter
dbauto on
or
dbauto off
to turn dbauto on or off (respectively). Entering dbauto
with no arguments returns the current state (either 'on' or 'off').