Breakpoint in Simulink MATLAB function block not working

I add a breakpoint to the code in my MATLAB function block in Simulink. I am running Simulink from a script using sim and it does not stop at the breakpoint. It is running the function because Simulink errors are being generated from functions called by the function block.

 Akzeptierte Antwort

Scott
Scott am 13 Nov. 2023

0 Stimmen

I tried a breakpoint in a similar model and it worked. I then realized that the function is not running; my Simulink error is a coder error.

Weitere Antworten (1)

Fangjun Jiang
Fangjun Jiang am 13 Nov. 2023

0 Stimmen

2 Kommentare

Did not work.
Then it is better to run simulation interactively to debug it, although you could use sldebug().

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Schedule Model Components finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2017b

Gefragt:

am 13 Nov. 2023

Beantwortet:

am 13 Nov. 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by