Debug File Viewer

The Debug File Viewer lets you visualize the data in the .dhdf file that is generated when you run a simulation after selecting the Create debug file option in the Simulation Preferences.

On the ribbon, from the Tools menu, select the Debug File Viewer, and read in a .dhdf file to do the following:

  • Gain access to all of the signals in a model.
  • Plot any signal (results vs. time) in the model hierarchy.
  • Plot multiple signals on the same plot. For example, view a signal before entering and after exiting a block.
  • View debug files from two iterations and plot the files together to assess how modifications in a given iteration affect the simulation results.
  • Right-click to open a context menu and select to show, hide or modify the plot legend and tooltip display.

Creating a Debug File

Capture the simulation results, including the signal data of a model, in a .dhdf file that can serve to debug a model.

  1. After loading a model, on the ribbon, hover over the Simulate icon, and click the Simulation Parameters:
  2. On the Simulation Parameters dialog, select the Debug tab.
  3. Select the Create debug file option.
  4. For File location, select an option to save the debug file:
    • Same directory as model file. When you select this option, the file is automatically named after the model.
    • Enter a file name and directory. If you select this option, enter a file name and path in the corresponding fields.
  5. To automatically launch the Debug File Viewer and open the .dhdf file after the simulation is completed, select View debug file.
    Note: Alternatively, from the ribbon, select Tools > Debug File Viewer, then navigate to the file from the viewer.
  6. Select OK.