Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi 7: how to see the value of local variables upper in the call stack?

In Delphi 7, while debugging I can see the current context local variables (Ctrl-Alt-L), and the call stack (Ctrl-Alt-S). When I navigate the call stack back to the caller methods, I don't know how to inspect the caller local variables. Is it possible?

This is an old pet peeve of mine. I can do it in all the languages I've programmed, but not in Delphi.

like image 979
neves Avatar asked Jan 02 '12 14:01

neves


1 Answers

The feature you are looking for was added to the Win32 debugger in Delphi 2005:

Delphi 2005 Reviewer's Guide

...

A popular debugging feature in Delphi 8 and C# Builder is the capability to select a particular frame from the call stack using the Local Variables dialog box. This feature is now available for the Borland Win32 Debugger.

With the Borland Win32 Debugger loaded, view the Local Variables dialog box. (If this dialog box is not already visible, select View | Debug Windows | Local Variables, or press Ctrl-Alt-L, to display it.) Initially, the values of variables local to the current function that the debugger is in are shown. To view local variables in one of the methods earlier in the call chain, select the method name from the drop-down menu.


(source: embarcadero.com)


In Delphi 7 the local variables view always shows the local variables for the function in which execution has broken on.

like image 124
David Heffernan Avatar answered Nov 13 '22 13:11

David Heffernan