Debugging C S-Functions called from simulink using Visual Studio Code

24 ビュー (過去 30 日間)
Tony
Tony 2019 年 3 月 21 日
コメント済み: claudio trinca 2019 年 10 月 30 日
Dear all,
I would like to be able to debug an s-function written in C using Visual Studio Code. I was able to debugg a C code called directly from matlab window, however, following the same instructions, I was not able to debug a C code when called from simulink. What extra steps should be taken? Thank you very much.

採用された回答

Mark McBroom
Mark McBroom 2019 年 3 月 22 日
  4 件のコメント
Mark McBroom
Mark McBroom 2019 年 10 月 29 日
You should be able to ignore VS exceptions. When the exception window comes up, click the box that allows you to ignore and the hit the Continue/Run button in VS.
claudio trinca
claudio trinca 2019 年 10 月 30 日
Hi Mark,
thank you the quick response.
the important thing that happens to me is that I can use correctly the brealpoints if I run the model from the Simulink "play" button but if instead I launch Test-Manager and run the model from the Test-Manager user interface the break-points that I set in VisualStudio while debugging the C++ S-Function are skipped
If you want I have a simplified model that I've attached in the ZIP file 20191023_example_Sfunction.zip
In the ZIP file there is also the TestManager file so you can try to launch It and check if you can make the breakpoints work

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by