Most of the time developers spend debugging their code, tracing the errors, checking the variables’ value changes over time.
When it comes to Delphi, we have several professional debugging tools that help to access the Delphi debug information and finding the problems easily.
One of the finest Delphi debugging frameworks is the DebugEngine.
What is DebugEngine?
DebugEngine is a collection of utilities related to debugging stuff (stack trace, CPU registers snapshot, debug info).
You can find detailed information on how to configure the DebugEngine in your environment here.
var
P: Pointer;
begin
{ Private variable System.MemoryManager }
P := GetSymbolAddress(0, 'System', 'MemoryManager');
{ Private method System.SetExceptionHandler }
P := GetSymbolAddress(0, '', 'SetExceptionHandler');
{ Protected method TCustomForm.CloseModal }
P := GetSymbolAddress(0, '', 'TCustomForm.CloseModal');
{ Windows api }
P := GetSymbolAddress(GetModuleHandle(user32), '', 'MessageBoxA');
end;
Features:
DebugEngine has a lot of functions and utilities allowing you to do for example:
- Support x86 and x64 architecture.
- Accessing Delphi debug info.
- Getting the address of the symbol from its name.
- Delphi map parsing and map converter to binary format.
- Remove and restore Delphi debug info from the PE file.
- Smart stack trace.
- Try blocks trace.
- Updating resource of Delphi app even if it was linked with debug info.
- Inserting custom debug info into PE file.
- CPU registers snapshot.
- Accessing vector registers.
- Disasm and comment function with Debug info.
- Enumerating exception handlers.
- Delphi exception stack trace hook.
- Delphi string detection.
- PE utils.
- Disasm utils.
Head over and check out the DebugEngine framework for Delphi!