[Lazarus] more locals: variable values in sub-functions

Marc Weustink marc at dommelstein.net
Tue Oct 27 23:08:42 CET 2009


Martin wrote:
> David Emerson wrote:
>> procedure foo;
>>   var a : longint;
>>   procedure bar;
>>     var b : longint;
>>     begin
>>       writeln (a);
>>     end;
>>
>> Given the above, is there a way to make the "Locals" window display 
>> the value of "a" while stepping through the code in proc "bar"?
>>   
> I believe the latest 0.9.29 snapshots can do that.

nope. The latest snapshots can evaluate "a", but have no knowledge if 
"a" is visible inside bar. And imo, "a" is not a local to bar.

> But all versions of lazarus can do it, using the stack window.
> In the stack window you can set the current frame to any stack-frame you 
> want.
> The local-var window, the hint, and the watches window, will all follow 
> this.

And you can add "a" to your watches window.

Marc






More information about the Lazarus mailing list