Tracing until a value change or until a value match

From m204wiki
Revision as of 17:42, 25 April 2023 by Ekern (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Another tracing option lets you step through a program, stopping on each statement that changes a specified data item. In this case, both the statement that modified the item and the resulting value are shown in the Execution Trace tab.

To trace until a variable value changes:

1. Enter a variable or data item name in the Entity name input box below the main window.
Note: Items like global variables or Model 204 fields or parameters require the additional prefixes before their names that are described in Viewing and modifying program elements.
2. Click the Run to Change button:
traceBut4b
The request runs until the specified item is modified.  
If the value of the item does not change, execution runs until the end of the request or one of the events listed in "Tracing all lines executed."
3. View the result in the Execution Trace page.
If the request contains further changes to the value, you can click the <vav>Run to Change button again, or you can press the Enter key (which repeats the Run to Change action whenever the Run to Change button is highlighted.
The runUntilVariableChanges mappable command and the Run Until Variable Changes option in the Client's Execution menu have the same effect as the Run To Change button.

A variation of the "tracing until" technique lets you continue a request's execution until a selected item's value is equal to a value you specify. For example, you may want to use this feature to verify that a variable does not ever become a certain value.

To trace until a particular data item value:

1. Enter the item name (prefixed if necessary) in the Entity name input box.
2. Press the Alt key while clicking the Run to Change button.
The traceUntilVariableEqualsValue mappable command and the Trace Until Variable Equals Value option in the Client's Execution menu have the same effect as the ALT-var>Run To Change button.
3. In the Tracing dialog box, specify the value of the variable at which tracing will stop:
traceUntil
4. Click the Trace button, at the right.
The request will run until the statement that makes the value of the selected item equal to the value you just specified, or the request will run until the end of the request or one of the events listed in "Tracing all lines executed".