<< Click to Display Table of Contents >> Navigation: Debugging > ScriptDebugger class |
For debugging a script it is necessary to implement a THtScriptDebugger abstract class.
It has following methods:
THtScriptDebugger = class
public
/// Executed before script run
procedure OnRun(Sender: THtScriptParser); virtual;
/// Executed after script run
procedure OnStop(Sender: THtScriptParser); virtual;
/// Executed when script is paused
procedure OnPause(Sender: THtScriptParser); virtual;
/// Executed when script continue running
procedure OnResume(Sender: THtScriptParser); virtual;
/// Used in Paused mode to process application messages. Simply call Application.ProcessMessages in this procedure.
procedure ProcessMessages(Sender: THtScriptParser); virtual;
/// Triggered by Console.Log method in script
procedure OnConsoleLog(MessageType: THtConsoleMessageType; const s: string); virtual;
end;
After implementing a class set HtScriptDebuggerGlobal global variable.