The Source Debugger allows you to enter a Boolean expression using the VTS script syntax. This Boolean expression will be evaluated in the scope of each instance of the currently selected module. Each module for which the expression evaluates to true is made the currently selected module. This allows you to locate a specific module instance among many.
To search for a specific instance of a module:
1. Click the Find Module button. The Find Module dialog will open.
2. Enter a Boolean expression in the field provided.
Note: The Boolean expression must conform to the VTS script syntax, and must precede all variable references with a scope resolution operator (\).
3. Click the Find button at the top of the Find Module dialog.
This facility can be extremely useful where you are diagnosing a problem in a large application that may have many instances of the same module (such as a tag), and you need to locate a specific instance. As an example, let's assume that you are using the "Completed Tutorial Example" application that is provided with your VTS installation, and you wish to locate the instance of the module "AnalogInput" that corresponds to the tag "AI20_2". This module instance can be identified easily enough because we know that the variable "Name" within that module holds the tag's name. As a result, we would search every instance of the module "AnalogInput" for variable Name equals AI20_2. The script expression to do this is:
\Name == "AI20_2"
Note that the text value of the name is contained within quotes, as per a normal string literal, and that the variable "Name" is preceded by a scope resolution operator (\).
Once you have selected any instance of the module "AnalogInput" and entered the above expression, pressing the Find button compiles the expression "on the fly", and then evaluates it within each instance of the currently selected module. When the expression returns true, the search is stopped and the located module instance is made the currently selected module instance. Pressing the Find button again causes the search to resume from the point at which it left off.
When no more instances that evaluate to true can be located, the following result is displayed:

If the Source Debugger is unable to compile the supplied expression, an error dialog is displayed, describing the error. For example, if the above expression was erroneously typed as
(\Name == "AI20_2"
the Source Debugger will display a dialog like the example below, indicating the nature of the error.
