Difference between revisions of "IDE Window: Local Variables"

From Lazarus wiki
Jump to navigationJump to search
(Fix heading levels; replace outdated image; fix typos)
Line 1: Line 1:
 
{{IDE Window: Local Variables}}
 
{{IDE Window: Local Variables}}
  
= Important =  
+
== Navigation ==
 +
 
 +
 
 +
 
 +
== Important ==  
  
 
You must [[Debugger_Setup |setup the debugger]] and start the project to debug it. Only then this window will be useful.
 
You must [[Debugger_Setup |setup the debugger]] and start the project to debug it. Only then this window will be useful.
  
= Local variables =
+
== Local variables ==
  
[[File:Locals.png]]
+
[[File:Local_Variables_2_0_10.jpg]]
  
This is the list of the local variables and its current values of the current function/procedure.
+
This is the list of the local variables and their current values of the current function/procedure.
  
= Data displayed =
+
== Data displayed ==
  
;Name: The mangled name of the variable. Normally the compiler converts pascal identifier to uppercase. You will see local variables only if the procedure was compiled with debugging information.
+
;Name: The mangled name of the variable. Normally the compiler converts the Pascal identifier to uppercase. You will see local variables only if the procedure was compiled with debugging information.
 
;Values: The current value of the local variable.
 
;Values: The current value of the local variable.
  
Note: The values are shown in a very basic form. e.g Objects are shown as pointer, instead of structure. You may get more information by adding a variable to the [[IDE_Window:_Watch_list|watch list]]
+
Note: The values are shown in a very basic form. e.g Objects are shown as pointer, instead of structure. You may get more information by adding a variable to the [[IDE_Window:_Watch_list|Watches]] window.
  
=== Scope (Stackframe, Thread, History) ===
+
== Scope (Stackframe, Thread, History) ==
  
The values are evaluated according to the scope set in the [[IDE_Window:_Threads|Thread]] and [[IDE_Window:_Call_Stack|Stack]] dialog. Default is the current Thread and top stack frame.
+
The values are evaluated according to the scope set in the [[IDE_Window:_Threads|Thread]] and [[IDE_Window:_Call_Stack|Call Stack]] dialogs. Default is the current Thread and top stack frame.
Both (Stack and Frame) dialog offer to change the "current" Frame/Thread. The watch window will follow this selection.
+
Both (Stack and Frame) dialogs offer to change the "current" Frame/Thread. The Watches window will follow this selection.
  
 
It is also possible to select previously displayed values, using the [[IDE_Window:_Debug_History|History]] dialog.
 
It is also possible to select previously displayed values, using the [[IDE_Window:_Debug_History|History]] dialog.
  
= See Also =
+
== See also ==
  
* [[IDE_Window:_Watch_list|watch list]]
+
* [[IDE_Window:_Watch_list|Watches Window]]
 
* [[IDE_Window:_Debug_History|Debug History]]
 
* [[IDE_Window:_Debug_History|Debug History]]

Revision as of 09:56, 1 February 2021

Deutsch (de) English (en) français (fr) русский (ru)

Navigation

Important

You must setup the debugger and start the project to debug it. Only then this window will be useful.

Local variables

Local Variables 2 0 10.jpg

This is the list of the local variables and their current values of the current function/procedure.

Data displayed

Name
The mangled name of the variable. Normally the compiler converts the Pascal identifier to uppercase. You will see local variables only if the procedure was compiled with debugging information.
Values
The current value of the local variable.

Note: The values are shown in a very basic form. e.g Objects are shown as pointer, instead of structure. You may get more information by adding a variable to the Watches window.

Scope (Stackframe, Thread, History)

The values are evaluated according to the scope set in the Thread and Call Stack dialogs. Default is the current Thread and top stack frame. Both (Stack and Frame) dialogs offer to change the "current" Frame/Thread. The Watches window will follow this selection.

It is also possible to select previously displayed values, using the History dialog.

See also