Inspector

Inspector can be accessed within the Runtime Client by selecting Tools | Inspector or clicking the Inspector icon on the toolbar.

Use Inspector to monitor the values of objects, expressions and variables while stepping through scripts, macros or navigating screens in your application.

There are three debugging windows within Inspector: the All window, the Auto window, and the Watch window.

All window

 

The All window lists every available Newlook object and any active Newlook variables.

Inspector can also be used to examine the value of any local script variables that are within the current execution scope. Variables created within a function are only in scope while the function is executing, therefore you will need to set breakpoints or step through your script to examine their contents in Inspector.

Each object in Inspector can be expanded to show its properties, collections or child objects. Objects such as ThisSession, ActiveForm and ActiveControl are particularly useful for debugging.

APP OBJECT in MUltI-SESSION SOLUTIONS:

The top level App object in Inspector is relative to the session that was active at the time Inspector was opened - however it does not refresh when the active session changes (this is a known limitation). Note that this is slightly different to the way the App object is resolved in Scripts, where it is relative to the currently executing session. Refer to the Sessions topic in Help for more information on how to use App in scripts. For solutions running in only one session, the Sessions collection in Inspector can be completely ignored and you can refer to the top level App object in exactly the same way as in previous versions.

Right-clicking an individual item in Inspector opens a context menu, from which you can copy or paste an item or its value, temporarily edit the runtime value of an item, add or delete the item from your watch list (refer to Watch Window section below).

The Find Control tool () can be used to quickly locate the selected control in the object tree. Click Find Control then click on any control in the runtime client to locate it.

Managing variables

It is also possible to create a new variable or edit an existing one in Inspector. This can be useful if you need to test the runtime behavior of scripts or expressions with different values.

To add a new variable, position your cursor on one of the properties or objects in Inspector (not on an existing variable) and click the Set Variable button. This will open a dialog where you can specify the name of your new variable and its value. Keep in mind that string values must be surrounded by quotes.

To edit the value of any existing variable, select the variable in Inspector, and either right click and select Edit from the context menu, or click the Set Variable button to open the dialog. To remove an individual variable, select it and click the Remove button, to remove all current variables, click Remove All.

Auto window

The Auto window shows the value of any variables or object properties that have been referenced or changed by the currently executing macro actions. As the execution switches from one macro action to another, the contents of the Auto window changes to reflect only the variables and objects applicable to the current macro action.

Watch window

The Watch window displays your current watch expressions and their runtime value. Watch expressions are expressions you want to monitor as a macro or script executes or as you interact with the form.

Managing items in the watch list

There are various ways to add an item to the watch list. If the item is in the current object model or is a current variable, switch over to the All tab, expand the object tree and navigate to the item or variable you wish to monitor. Right-click and select the Add Watch option.

 

The second method is by clicking the Add button () in the watch tab. Manually enter the expression, object or variable that you want to add to the watch list.

Use the Delete () or Delete All () buttons in the Watch window to remove individual items, or all items, from your watch list.

To ensure that you are getting the current value of all items in your watch list, click the Refresh button ().

See Also

Debugging Macros | Newlook object model | Debugging menu options