THE CONTINUE FUNCTION
The first step in integrating debugging support into your application is modifying the continue functions. Your application may or may not have such a function currently. If it does not, you will need to add one in order to integrate with the debugger. The continue function is specified by one of the context parameters passed when creating a new context. At the end of your continue function, you need to invoke this ScriptEase debugger API call:
This call communicates with debugger. This is a blocking call so it will not return until the debugger gives the application more work to perform. A second, non-blocking version of this API is available:
seDbgNBContinue(secontext se,sememcount timeout);
This version will return to you after the given number of milliseconds as specified by the timeout. If the function returns FALSE, you may exit from the continue function. However, if it returns TRUE you must call the routine again before exiting from the continue function. The continue function itself consists of any code that must be executed periodically. You would use this call as in this example:
SE_CALLBACK( void )
/* your existing continue code here */
while( seDbgNBContinue(se,TIMEOUT) );
The timeout you specify depends on the needs of your code. For an application that handles GUI interface interaction in its continue function, responsiveness is important. A timeout of 100 milliseconds would be a reasonable choice in this case.
Once you have modified or created your continue function, it must be called after each statement in the script is executed. This may not be the case depending on the parameters passed to your seEval calls or to such calls in libraries you are using. To ensure this is always the case, set the SE_OPT_DEBUGGER flag in the context parameter's options. There is no need to alter any of your seEval calls.
THE AT ERROR FUNCTION