Path: /sdk/add_on/debugger/
The CDebugger
implements common debugging functionality for scripts, e.g. setting breakpoints, stepping through the code, examining values of variables, etc.
To use the debugger the line callback should be set in the context. This will allow the debugger to take over whenever a breakpoint is reached, so the script can be debugged.
By default the debugger uses the standard in and standard out streams to interact with the user, but this can be easily overloaded by deriving from the CDebugger
class and implementing the methods TakeCommands
and Output
. With this it is possible to implement a graphical interface, or even remote debugging for an application.
The application developer may also be interested in registering to-string callbacks for registered types with calls to RegisterToStringCallback
. Optionally the ToString
method in the debugger can be overridden to implement custom to-string logic.