go-skip-qqq              package:debug              R Documentation

_F_l_o_w _c_o_n_t_r_o_l _f_o_r _d_e_b_u_g_g_e_r

_D_e_s_c_r_i_p_t_i_o_n:

     'go', 'skip' and 'qqq' ONLY work inside the debugger, i.e. while
     you are paused at a D(...)> prompt during the execution of a
     function that has been 'mtrace'd. 'go' makes the debugger begn
     executing code continuously, without user intervention; 'skip(n)'
     shifts the execution point; 'qqq()' quits the debugger.

_U_s_a_g_e:

     go(line.no) # line.no can be missing
     skip(line.no)
     qqq()

_A_r_g_u_m_e_n_t_s:

 line.no: a line number, as shown in the code window (see also DETAILS)

_D_e_t_a_i_l_s:

     'go()' without any argument puts the debugger into "go mode",
     whereby it starts executing function code without pausing for
     input (see 'README.debug'). 'go(n)' basically means "run
     continuously until you reach line n". It sets a temporary
     breakpoint at line 'n', which is triggered the first time line 'n'
     is reached and then immediately cleared.

     'skip(n)' moves the execution point (highlighted in the code
     window) to line 'n', without executing any intervening statements.
     You can 'skip' forwards and backwards, and between the main
     function code and the exit code. You can skip in and out of loops
     and conditionals, except that you can't skip into a 'for' loop
     (the execution point will move to the start of the loop instead).
     Note that skipping backwards does not undo any statements already
     executed. 'skip' is useful for circumventing errors, and for
     ensuring that exit code gets run before calling 'qqq()'.

     'qqq()' quits the debugger, closing all code windows, and returns
     to the command prompt. No further code statements will be
     executed, which means no exit code either; take care with open
     files and connections.

_N_o_t_e:

     Previous versions of the debugger used 'q()' to quit. With
     hindsight, this seems unwise, so I've changed it. However, calls
     to 'q()' while debugging are still intercepted, and a warning is
     printed.

_A_u_t_h_o_r(_s):

     Mark Bravington

_S_e_e _A_l_s_o:

     'README.debug', 'mtrace', 'bp'

