In the Delphi debugAPI there are a couple of references to a FrameIndex
e.g. in:
unit DebugAPI;
interface
type
IOTADebugger = interface(IInterface)
function CanToggleBreakpointOnFrame(FrameIndex: Integer): Boolean;
function GetSupportedRunParametersCommands: TRunParametersCommands;
function CanSetNextStatement(const Filename: string;
LineNumber: Integer): Boolean;
procedure ProcessDebugEvents;
function FrameHasDebugInfo(FrameIndex: Integer): Boolean;
function GetDisplayableDebuggerName: string;
function GetFrameBreakpoint(FrameIndex: Integer): IOTABreakpoint;
procedure ToggleBreakpointOnFrame(FrameIndex: Integer);
.....
Several methods accept a FrameIndex
parameter, but, what is a FrameIndex
? and where I can aquire a FrameIndex
?
This refers to the call stack frame. It's a little known feature that you can set break points on items in the call stack.
Then when you run, the debugger will break when you return to that function. The debugger implements this feature by setting a breakpoint at the return address for that entry in the call stack.
For instance, here is a simple call stack where I have placed a break point on an item in the call stack:
The icons in the gutter of the call stack window indicate whether or not debug information is available, whether break points are set, etc. Full details can be found in the documentation: Call Stack Window.