Difference between revisions of "TDebuggerIntf"
From Free Pascal wiki
Jump to navigationJump to searchm |
|||
Line 7: | Line 7: | ||
==Minimal Implementation== | ==Minimal Implementation== | ||
The following methods must be implemented for TDebbugerIntf | The following methods must be implemented for TDebbugerIntf | ||
− | * '''GetSupportedCommands''' - returns the set of formats that a debugger can perform | + | * '''GetSupportedCommands''' (or '''GetCommands''') - returns the set of formats that a debugger can perform |
* '''RequestCommand''' - the method actually performing commands. Only commands returned by '''GetSupportedCommands''' would be passed to this method | * '''RequestCommand''' - the method actually performing commands. Only commands returned by '''GetSupportedCommands''' would be passed to this method | ||
* '''Caption''' - the method return user-friendly name of the debugger | * '''Caption''' - the method return user-friendly name of the debugger |
Revision as of 21:30, 23 October 2017
TDebuggerIntf is the base class of implementing a debugger as Lazarus-IDE plugin package. The package must have DebuggerIntf package as it's requirements. Any debugger plug-in must implement the class and register via RegisterDebugger (called at Register of registering unit).
The class is designed to act as asynchronous object. Thus requested changes are not expected to take effect right after the end of the process (even though this is not forbidden). Any actual change taking place should be reported with an additional method call.
Minimal Implementation
The following methods must be implemented for TDebbugerIntf
- GetSupportedCommands (or GetCommands) - returns the set of formats that a debugger can perform
- RequestCommand - the method actually performing commands. Only commands returned by GetSupportedCommands would be passed to this method
- Caption - the method return user-friendly name of the debugger
Methods
RequestCommand
The method should return false, if the command cannot be executed.
Debugger Commands
Command | Parameters |
---|---|
dcRun | no parameters |
dcPause | |
dcStop | no parameters |
dcStepOver | |
dcStepInto | |
dcStepOut | |
dcRunTo | |
dcJumpto | |
dcAttach | |
dcDetach | |
dcBreak | |
dcWatch | |
dcLocal | |
dcEvaluate | |
dcModify | |
dcEnvironment | |
dcSetStackFrame | |
dcDisassemble | |
dcStepOverInstr | |
dcStepIntoInstr | |
dcSendConsoleInput |
Development Hints
- it might be helpful to recompile DebuggerIntf package, adding the following Custom Options to the compiler options of the package
- -dDBG_STATE
- -dDBG_EVENTS
- -dDBG_VERBOSE
- -dDBG_WARNINGS
- -dDBG_DATA_MONITORS
- -dDBG_DISASSEMBLER
- these defines provide more logging output of TDebuggerIntf
- it might be helpful to rebuild IDE adding the following defines into build Options:
- -dVerboseDebugger
- VerboseDebugger logs messages debugging calls from IDE itself