The QGen Debugger lets you monitor and control the execution of code generated from Simulink® models, either on the host ("Software in the Loop", or SIL) or on an embedded target machine ("Processor in the Loop", or PIL). The debugger gives you full control through model-level breakpoints and signal-value displays, helping to bridge the gap between control engineering and software engineering.

You can combine code generated by QGen along with hand-written code. Both can be debugged together, and the QGen Debugger will display the model and its signal values whenever it reaches sections of generated code.

The QGen debugger also lets you alter the values of signals and provides easy ways to redirect program execution and force the model to reach a certain state at any point.

All signal values can be logged and traced back to the original Simulink® block inside MATLAB, to help resolve unexpected behavior.

Features

Debugger Code Assembly 2

Observe the model behavior at code level granularity.

The Debugger keeps the Simulink® model execution in sync with code execution through the traceability information built by QGen that links the generated code with the original model. You can thus analyze the model's behavior while stepping through Ada/C code or even assembly code.

Debug code running on the host, remote target or a local emulator

Using GPS’s built-in toolchain and target capabilities you can directly (cross-)compile and run the code on a supported platform while debugging the model using the execution behavior on the target.

Debuggercrop Model View

Display a model and browse it within GPS

The Simulink® model can be displayed within its own GPS tab, as a read-only view showing all Simulink® blocks, subsystems and references. The GPS Outline view lets you browse the model using a tree view of all subsystems and references or by directly clicking on blocks.

Debugger Matlab

Generate the debugging environment from MATLAB using Simulink® signal generator blocks

You can define the model's inputs via MATLAB, using any Simulink® block or even other Simulink® models. The QGen Debugger will record all inputs provided to the model and will create a debugging session where the same inputs are sent to the generated code. The behavior of the model and the generated code with these inputs can then be observed and debugged in sync.

Debugger Contextual

Insert a breakpoint on a given block or model reference

Just as you can insert a breakpoint in the source code, the QGen Debugger lets you insert a breakpoint directly from the model view by clicking a particular block of interest. Execution will subsequently pause when reaching the code corresponding to that block.

Debugger Execution

Display values for signals dynamically

By maintaining exact traceability between code variables and their corresponding signals in the Simulink model, the QGen Debugger can display signal values as they are updated. Blocks that have been executed will be greyed out to help show which signals have been updated and which still have the values from the previous computation cycle.

Debugger Contextual 2

Change signal values during the execution

The QGen Debugger is a powerful tool to analyze the specific behavior of a given Simulink® model. By changing signal values for one or more iterations you can easily direct the model into a desired state of interest to the debugging session.

Debugger Log

Log values in a table, and highlight corresponding blocks in Simulink®

You can store all in an html file all or some signal values obtained during a debug session. When opening this file in MATLAB, you then have links to the corresponding source block of each signal. This helps trace problems identified at the code level to corresponding model-level blocks, where you can investigate them in Simulink®.

Analyze model behavior when combined with handwritten code or code generated  from other models

The QGen Debugger gives you a unique way to examine how a Simulink® model behaves when connected to other pieces of code. You can debug an entire program consisting of both manually produced and auto-generated codebases. The QGen Debugger will automatically display the model view each time a code section generated by QGen is reached.