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?

 Accepted Answer

Isha
Isha on 16 Mar 2026 at 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 Comment

William
William on 17 Mar 2026 at 16:10
Edited: William on 17 Mar 2026 at 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

Sign in to comment.

More Answers (0)

Categories

Find more on Test Model Components in Help Center and File Exchange

Products

Release

R2025b

Asked:

on 10 Mar 2026 at 22:49

Edited:

on 17 Mar 2026 at 18:18

Community Treasure Hunt

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

Start Hunting!