Main Content

Code Tracing

Trace between generated code and corresponding blocks in a model

Code tracing enables easy navigation between a line of generated code and its corresponding elements in a model for code verification. To verify your generated code:

  • Trace between generated code and model elements by using these types of navigation:

    • Code-to-model: Trace code to model elements by using hyperlinks in the code generation report.

    • Model-to-code: Trace model elements back to corresponding lines of the generated code.

Topics

Verify Generated Code by Using Code Tracing

Verify generated code by using code tracing to navigate between the generated code and its corresponding model elements.

Trace Simulink Model Elements in Generated Code

Trace Simulink® model elements by using code-to-model and model-to-code traceability in the code generation report.

Trace Stateflow Elements in Generated Code

Trace different Stateflow® elements to corresponding lines in generated code.