IDE Window: Variable Inspector
You must setup the debugger and start the project to debug it. Only then will this window be useful.
Also known as "Debug Inspector"
Allows to watch an expression. If the expression is a structure, then each field is displayed as a separate entry.
- The Variable Inspector does not automatically follow the changes of current Thread or Stack. You can toggle the "use instance class" setting, to refresh the result.
- This dialog is not affected by the History dialog.
- If the result is a structure that has properties, they may not be included.
Scope (Stackframe, Thread)
The values are evaluated according to the scope set in the Thread and Stack dialog at the time of setting the expression. Default is the current Thread and top stack frame. Both (Stack and Frame) dialog offer to change the "current" Frame/Thread.
- Setting the value
- The interface does not currently provide any method to change the expression from within the dialog. (This was added to Lazarus past version 1.0).
- The value can be set from the Watch list (via context menu of an existing watch) or the Evaluate Window.
- If the data is a structure with methods, they are displayed separately.
- Use Instance class type
- Objects are normally shown according to the declaration of the watched expression. Showing "Sender: TObject" will only show you data, that is declared in TObject. However object variables can contain objects of inherited classes. Sender may be a TForm. Using this the debugger will find the actual class of the object and display all data.