Enable SIL Debugging With Visual Studio 2022

I want to debug an entire simulink model running in a C++ compiled application. This article appears to address it:
However, no runtime functions are found. I have installed the r2025b runtime matching my Matlab, verified that the runtime is in the path, restarted the computer.
I found this on that web page:
To enable your debugger for a SIL simulation, perform one of these actions:
  • On the SIL/PIL tab, in the Settings gallery, under SIL/PIL Settings, click Debugging.
  • In the Configuration Parameters dialog box, select the Enable source-level debugging for SIL or PIL check box.
Where is the SIL/PIL tab in the Settings gallery, or conversely the Configuration Parameters setting?

 採用された回答

Isha
Isha 2026 年 3 月 16 日 9:31

1 投票

Hello,
The SIL/PIL tab is available in the Simulink Toolstrip when you select a block or model that supports SIL or PIL.
Steps to Access the SIL/PIL Tab:
  1. Open your Simulink model.
  2. Select the block (often a Model block or Subsystem) that you want to run in SIL or PIL mode.
  3. Once selected, you should see a new tab appear in the Simulink Toolstrip labeled SIL/PIL.
If you don't see it, make sure your block is eligible for SIL/PIL (typically, Model blocks configured for code generation).
SIL/PIL mode is available for blocks/models that are set up for code generation (i.e., Embedded Coder is required).
After enabling debugging, regenerate code and rebuild the SIL target.
Hope this helps.

1 件のコメント

William
William 2026 年 3 月 17 日 16:10
編集済み: William 2026 年 3 月 17 日 18:18
Hi Isha,
Thank you for replying. The model I have is large, developed by others, so I'm feeling my way at this point.
I have Simulink Coder. This entire project is coded into C, everything is set up for code generation. Neither selecting the dot-slx component in the model explorer nor selecting a block within a project causes the SIL/PIL tab to appear in the Simulink toolstrip. I was able to find it starting from the apps tab.
After re-reading SIL/HIL documentation, SIL requires Simulink to start the compiled model in a new process to enable debugging in Matlab/Simulink. So this won't work for the use case I was envisioning.
Best regards,
Bill

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeTest Model Components についてさらに検索

製品

リリース

R2025b

タグ

質問済み:

2026 年 3 月 10 日 22:49

編集済み:

2026 年 3 月 17 日 18:18

Community Treasure Hunt

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

Start Hunting!

Translated by