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
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 Exchange 中查找有关 Test 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