MATLAB: How to debug the code generated from the Stateflow chart

codecoderdebugdebuggerdebuggingg++generatedmexmicrosoftstateflowStateflow Coderstudiovisual

I have a .dll file generated from Stateflow. i would like to debug it, similar to using the -g option with S-Functions.

Best Answer

Documentation on how to debug the generated code from a Stateflow chart is missing from the Stateflow documentation.
To work around this issue, download the example MATLAB file (sf_example.m) and HTML-file (sf_example.html) available below:
This example was created as an example for Stateflow Coder 6.5 (R2006b). If you are using a version earlier than Stateflow Coder 6.0 (R14) , read the following:
The syntax used by Stateflow Coder is a little different. You need to change the call which reads:
sf feature developer on
to the following syntax:
sf Feature developer on