Command line debugging

The workbench includes a powerful tool that enables you to run debug and monitoring commands during simulation or connected mode tests. Commands are entered as in a console in "prompt" mode. Commands are avaibale for reading and writing any complex variable or expression.

Debugging in prompt mode is available from the "Prompt" tab of the output window.

Reading expressions

To read a variable or a complex ST expression, just enter it at the prompt and hit ENTER. The expression may contain any ST operator, and can be used with variable indexes in case of an array. Below are some examples:

= 100
>iLevel > 123.4
= 123

The following ST operators can be used in expressions:

& AND OR XOR boolean operations
+ - / * arithmetics
= <> < > <= >= comparisons
[ , ] array index specification
. structure member specification

The ST expression can also include constant values.

Forcing variables

To force a variable, enter its name followed by the ":=" sign and any ST expression. The specification of the forced variable may include variable indexes in case of an array. Below are some examples:

>MyVar := 200
>MyArray[i+1] := iValue + 2

Specifying a parent program

In order to get access to local variables, you need to specify the name of the default parent program. For that, enter "!local=" followed by the name of the program. When a parent program is specified, all variables used in commands can be either global or local to this program. Below is an example: