Page History
With the Watch pane, you can easily monitor selected properties and their expressions with runtime values while debugging. The Watch pane displays a flat list of selected runtime values during model simulation.
The Watch pane with expressions and their selected runtime values during model simulation.
For any projects with the default Simulation window settings, the Watch window will be opened by default in the same group as the Variables and Breakpoints as the last pane. If the user saves the project, the Watch window properties will be kept according to the recent settings like the other panes. Also, you can manually open it by clicking in the Simulation toolbar. This pane contains two columns:
- Name/Expression that can be edited. When you add a Watch item, it will be shown in this column.
- Value is editable if it represents value property, but not an expression. When you add a Watch item, its value will be in this column. The Value column will be highlighted in red or green the same as in the Variables pane.
Note | ||
---|---|---|
| ||
|
You can add Watch items to the Watch pane using the following:
- Variables pane
- Console pane
- Watch pane
- SelectPropertiesConfig stereotype
- Internal Block or Parametric Diagram
Adding Watch items using the Variables pane
To add Watch items using the Variables pane
- In the Variables pane, right-click the property you want to add and select Add Watch.
Adding Watch items using the Console pane
To add Watch items using the Console pane
- In the input box (>>) of the Console pane, type properties and expressions you want to add to the Watch pane.
- In the Console pane toolbar click . The properties and expressions in the input box (>>) are added to the Watch pane. Also, the simulation automatically saves the selected language in the list box.
Adding Watch items using the Watch pane
To add Watch items using the Watch pane
- Do one of the following:
- In the Watch pane toolbar, click .
- In the Watch pane, click the first blank row.
- Type the property or expression you want to add.
Note | ||
---|---|---|
| ||
|
Adding Watch items using the SelectPropertiesConfig stereotype
To use the «SelectPropertiesConfig» stereotype as a predefined list of properties and add it to a Simulation Configuration
- Create a Simulation Configuration diagram.
- Add a «SelectPropertiesConfig» and «SimulationConfig» to the diagram.
- Set Name, Represents (=object), and Value (=properties) of the «SelectPropertiesConfig».
Set Watch Properties (=«SelectPropertiesConfig») of the «SimulationConfig».
Note title Note The Watch Properties will be shown in Expert & All view mode. When running the «SimulationConfig», the Watch pane will append the properties populated from «SelectPropertiesConfig». If some properties already exist, they will not be added to the Watch pane.
Adding Watch items using an Internal Block or Parametric Diagram
You can add all kinds of properties (value, part, constraint), constraint parameters, and ports to the Watch pane directly from an Internal Block or Parametric Diagram.
Note |
---|
You can only use this method if the Internal Block or Parametric Diagram context is the same as the simulation context, or if the diagram context is the first level of the simulation context structure. |
To add Watch items using an Internal Block or Parametric Diagram
- Run the simulation.
- In an Internal Block or Parametric Diagram, right-click a property, constraint parameter, or port and select Simulation > Add to Watch.
Editing and removing Watch items
You can edit and remove any items by selecting the Name/Expression column on the Watch pane.
To edit a Watch item
- Click an item to edit and press ENTER.
To remove Watch items from the Watch pane
Do one of the following:
To remove a single Watch item, select the item you want to remove and click .
- To remove all Watch items, click .