Embedded Wizard Studio: Variables window
The Variables window appears when the prototyping session is paused. It provides a view of all operands used in context of the current and the immediately preceding statements. As such it is useful to inspect variables and objects while debugging step-by-step the implementation of your GUI components:
Variables window while debugging an application
Show the Variables window
The Variables window appears automatically when the running prototyping session is paused. However, if you have previously hidden the window, you can show it again by using the shortcut Alt6 or the menu item .
Inspect values
The window shows a list with operands and their respective contents. You can navigate in the list and inspect the individual values. Depending on the type of an operand, you can also expand it and inspect the contents embedded inside it. For example, you can see the data members of an object:
★To navigate in the list use the keys Up and Down.
★To expand an operand just click on the triangle found on the left of the operand
★... or press the key Right while the affected item is selected.
★To collapse an operand just click on the triangle found on the left of the operand
★... or press the key Left while the affected item is selected.
Track changes
The Variables window detects when during debugging the listed operands are modified and highlights automatically the affected items with green color. This color fades out with time allowing you to simply distinguish which variable has changed recently:
Object naming
Depending on the parentage of an object the Variables window uses different notations to identify it. In particular the instance this (the object in context of which the code is currently executed) is represented by a homonymous identifier this:
An embedded object is identified by its name you have originally specified in the implementation. If an object is nested inside another embedded object, it is identified by the complete path composed of all affected object names and separated by the . (dot) sign:
If the object was created dynamically by using the new operator, then the object is identified by a unique 32-bit hexadecimal number starting with the @ (at) sign. As long as the object exists this number remains valid:
In turn, a globally existing autoobject is identified by the name of the unit containing the respective autoobject and the name of the autoobject itself starting with the @ (at) sign. For example, the autoobject Example::PowerSupply is shown in the Variables window as follows:
Bitmap and font resources are identified similarly with the additional language variant name, separated by a _ (underscore) sign. For example, the instance of the bitmap resource Steel::PanelBack in its default language variant is shown in the Variables window as follows:
Memoryless properties
The Variables window displays only the contents stored within the memory associated to the listed operands. This can be confusing when the affected operand is a property implementing its own onget method. When you inspect a property in the Variables window the code of such onget methods is never executed in order to avoid potential interferences with the debugged application.
The Variables window limits to show what the memory behind the property does contain. This can in fact differ from the value calculated dynamically by the onget method of the affected property.
Hide the window
The Variables window disappears automatically as soon as the prototyping session is resumed or terminated. If desired however, you can hide this window temporarily and so uncover the screen areas lying behind it.
★To hide all debugging windows press the key F6
★... or select the menu item .
To show the windows again simply repeat this operation.