contents   index   previous   next



SECONTINUEFUNC

 

The proper place to put a debugger hook is in the seContinueFunc specified in your ScriptEase seContextParams structure. This function is called after each statement is processed. An alternative would be to evaluate a script using seEval with the SE_START option and do debugging work after each call to seExec. The problem with this alternative is that calls to wrapper functions are atomic. Therefore, if a wrapper function itself invokes code, such as a script call to eval(), your debugging work would not be called during that code.

 

The debugger must regain control after each statement to be useful. The easiest way to force this is to use seGetContextParams and set the SE_OPT_DEBUGGER flag on, like this:

 

struct seContextParams *params = seGetContextParams(se);

params->seOptions |= SE_OPT_DEBUGGER;


THE SIMPLE DEBUGGER