stoplast - Maple Help

Home : Support : Online Help : Programming : Debugging : stoplast

stoplast

set a breakpoint in the procedure that most recently raised an exception

 Calling Sequence stoplast(statNum)

Parameters

 statNum - (optional) statement number at which to stop in the procedure

Description

 • The stoplast function sets a breakpoint in the procedure that most recently raised an exception in the active Maple session.  The next time that procedure is invoked, the debugger is activated (see stopat).
 • The stoplast function accepts one optional integer argument.  If statNum is specified, stoplast stops at the specified statement in the procedure instead of at the beginning of the procedure.  This argument is equivalent to the statNum argument to the stopat() function.  For more information, see stopat.

Examples

Note: These examples illustrate the use of these debugger commands in Maple's command-line interface. In the standard (graphical) interface, the debugger runs in its own window, with controls for most of the common commands.  See Interactive Maple Debugger for details.

 > foo := proc() error "test"; end proc;
 ${\mathrm{foo}}{:=}{\mathbf{proc}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{error}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{"test"}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (1)
 > $\mathrm{foo}\left(\right)$
 > $\mathrm{stoplast}\left(\right)$
 $\left[{\mathrm{foo}}\right]$ (2)
 > $\mathrm{foo}\left(\right)$

 foo: 1*    error "test" DBG> cont