Silicon Labs documentation on VS Code Extension version 2.1.0.

Documentation source: https://docs.silabs.com/ss-vscode/2.1.0

# VS Code Extension

## Simplicity Studio Extension for VS Code

Leverage the power of Visual Studio Code while staying fully integrated with Simplicity Studio v6. The Simplicity Studio extension enables seamless build, flash, and debug operations directly within VS Code, while allowing you to continue using familiar Simplicity Studio project configurator GUIs.

### Key Features

- Create and configure projects in Studio, then hand off to VS Code for editing, building, flashing, and debugging
- Works with CMake-generated projects and Ninja build tools for efficient compile cycles
- Easily identify and connect to local and remote Silicon Labs 32-bit kits and SoCs from within VS Code
- Install directly from the VS Code Marketplace to effortlessly integrate with your development workflow

## Simplicity Studio VS Code Extension 2.1.0 (Jun 23, 2026) Release Notes

Leverage the power of Visual Studio Code while staying fully integrated with Simplicity Studio 6. The Simplicity Studio extension enables seamless build, flash, and debug operations directly within VS Code, while allowing you to continue using familiar Simplicity Studio project configurator graphical user interface.

### Release Summary

#### Key Features

##### Added in 2.1.0

- Verified with Simplicity Studio 6.2.0 and remains backward compatible with earlier Simplicity Studio 6  versions.
- Added support for Live Expressions, enabling real-time monitoring of variables and expressions without pausing application execution.
- Added support for opening Configurator-s from project folders within multi-project solutions.
- Added an **Attach to Running Target** option to connect the debugger without rebuilding or reflashing the device.
- Added a setting to suppress non-critical compatibility warnings shown in the VS Code Explorer.
- Build errors and warnings are now displayed in the VS Code Problems view for easier navigation to affected source files.
- Replaced the Microsoft C/C++ extension dependency with Clangd to provide improved build system integration.
- Redesigned the Devices view to provide an improved user experience for device management.

#### Bug Fixes

##### Fixed in 2.1.0

- Minor bug fixes and stability improvements.

All bug fixes are listed in the table below.

#### Removed/Deprecated Features

- Removed Studio v5-related settings.

#### Known Issues and Limitation

|UID|Issue or Limitation Description|Workaround (if any)|
|---|---|---|
|-|The Microsoft C/C++ extension is required for some IDE functionality.|None|
|-|Project **Configurator Additional Sources** menu does not support solution projects for adding customer source files.|Add customer source files in `CMakeLists.txt`.|

#### Bug Fixes

##### Fixed in 2.1.0

|Issue ID|Description|
|---|---|
|1596805|Fixed an issue where stale VCOM terminals could prevent debug adapters from being detected after reconnecting a device.|
|1618136|Fixed an issue where debug sessions could fail to start on Windows when the CMake path contained whitespace.|
|1592786|Fixed an issue where IntelliSense did not resolve include files correctly for some Z-Wave projects.|
|1602157|Fixed an issue where VS Code did not use the SDM hardware override when selecting the target part for flash and debug.|
|1629251|Fixed an issue in the Build Configurator where compiler flags were not applied to user-added source files.|
|1556187|Fixed an issue where projects opened from Simplicity Studio could incorrectly connect to a WSL environment.|
|1567407|Fixed an issue where expanded secure peripheral register groups could block debugging on Series 2 devices.|
|1591441|Fixed an issue where Matter solution projects could be created without the required `.vscode` configuration folder.|

## Set Up a Custom Board

Use one of the following workflows to develop applications for a custom board:

- **Create a device-compatible project** by using a board-independent **Empty** sample application.
- **Retarget an example project** created for a Silicon Labs development board to a device on your custom board.

### Create a Device-Compatible Project

The simplest approach is to create a project directly for the target device used on your custom board.

When you create the project, select the target device.

![Board selection during project creation](/ssv6-custom-board-setup/0.1/images/sld498-studio6-board-selection.png)

Then select one of the board-independent **Empty** sample applications provided by the Silicon Labs SDK, such as:

- **Bluetooth - SoC Empty**
- **Empty C Project**

![Board-independent Empty sample applications](/ssv6-custom-board-setup/0.1/images/sld498-empty-example-project.png)

This approach creates a project that is already configured for the selected device, including:

- Memory layout
- Clock configuration
- Available peripherals
- Device-specific constraints

The project should build successfully without additional modifications. You can then add any additional configurations required for your custom board and application requirements.

### Retarget an Example Project

If an existing example project closely matches your application, you can create a project for a Silicon Labs development board, such as a Radio Board or Explorer Kit, that uses a device similar to the target part on your custom board. You can then retarget it to the device on your custom board.

This workflow lets you reuse existing software components, peripheral configurations, and application code from a Silicon Labs example.

#### 1. Add a Virtual Device

You do not need a physical board to use this workflow. Silicon Labs development boards can be added as virtual devices in Simplicity Studio.

Silicon Labs development boards use superset target devices that provide additional pins, increased memory, enhanced peripherals, and expanded system capabilities.

For custom boards that use devices within the same device family, the retargeting workflow supports transitions between superset and subset devices.

To add a virtual device:

1. On the **DEVICES** page, select **Add Device(s)**.
2. In the **Search** field, enter the device or board name. Make sure the **Board** and **Part** checkboxes are selected.  
   - If no boards match, delete the last character to broaden the search.  
   - If no matches still appear, select a more general device family instead of one tied to a specific wireless protocol.
3. Select the device or board from the **Device & Products Catalog**.
4. The selected device is added to the **Device tree**, and a device profile tab opens.

#### 2. Create an Example Project

After you add a virtual device:

1. Select the board in the **Device tree**.
2. Open the **Example Projects & Demos** tab to view example projects for that board. If few examples are listed, select a different board.
3. Use filters to narrow the results.
4. Select **CREATE** for a project that closely matches the application you are developing or that uses similar peripherals.
5. Review the project documentation before you continue.

![Selecting an example project for a custom board workflow](/ssv6-custom-board-setup/0.1/images/sld498-custom-board-select-project.png)

After you create the project, make sure it builds successfully in Visual Studio Code before you retarget it.

#### 3. Retarget the Project

Although retargeting can be performed at any time, retargeting early helps minimize rework, especially if the target part does not have the same resources, such as pins or peripherals, as the part on the original board.

Retargeting requires you to remove the board and select the actual target part from the Project Configurator (`.slcp` file). This process includes two separate save operations: one after you remove the board and another after you set the target part.

To retarget the project:

1. In Simplicity Studio, select **Projects**.
2. For your project, open the **Overview** tab and locate the **Target and Tool Settings** card.
3. Select **Change Target/SDK/Generators**.
4. Enter `custom board` in the **Boards Search or Select** field.
5. In the **Part Search or Select** field, start entering the target part, and then select it from the drop-down list. Remove any listed boards by selecting the small **x** next to each board.
6. Select **Save**.

![Retargeting a project to a custom board device](/ssv6-custom-board-setup/0.1/images/sld498-custom-board-retarget-project.png)

The project is regenerated for the selected device.

When you retarget from a Silicon Labs development board, Project Configurator preserves board configurations, software components, and drivers, such as LEDs, buttons, HFXO, LFXO, RF front-end, and sensors, from the original board. This eliminates the need to manually create a Board Support Package (BSP) by using the Pintool, provided that the custom board pin configuration matches the Silicon Labs board.

If the pin configuration differs, for example, if an LED is assigned to a different pin, update the configuration by using the Pintool based on your custom board schematics.

#### 4. Resolve Configuration Issues

After you retarget the project, review it for configuration mismatches.

- **Pin Assignments**:  
  Update pin definitions to match the custom board schematic.
- **Hardware Resources**:  
  When you retarget to a target device with the same hardware features, such as peripherals, power modes, and memory, the configuration from the original example is retained. If the target device lacks peripherals or features that the original example uses, remove or replace unsupported components to prevent build failures.
- **Memory Configuration**:  
  Project Configurator automatically updates the linker configuration to reflect memory changes.

After you resolve any configuration issues, generate a **Project Configuration Report**. This report summarizes installed board components and helps verify the project setup.

### Configure Debugging for a Custom Board

The following Silicon Labs debug adapters are supported for programming and debugging custom boards and hardware:

|Debug Adapter|Debug Mode|Description|
|---|---|---|
|**Wireless Starter Kit Mainboard (WSTK BRD4001A)**|**OUT**|Uses the external debug connection for a custom board.|
|**Wireless Pro Kit Mainboard (WPK BRD4002A, OPN: Si-MB4002A)**|**MINI**|Uses the onboard mini-Simplicity connector.|
|**Wireless Pro Kit Mainboard (WPK BRD4002A, OPN: Si-MB4002A)**|**OUT**|Uses the debug connectors on the side of the board.|
|**Simplicity Link Debugger (Si-DBG1015A)**|**OUT**|Connects to the custom board through the mini-Simplicity connector or header pins by using jumper wires.|

> **Note**: For either a **WSTK** or **WPK** configured for **OUT** mode, the recommended connection method is to use a **Simplicity Debug Adapter Board (SLSDA001A)**. Insert the adapter board into the Debug Connector and Simplicity Connector, and then use a 10-pin ribbon cable to connect to the debug connector on the custom board.

#### Configure the Debug Adapter

1. In Simplicity Studio, select **DEVICES**.
2. In the **Device tree**, select the board you want to use as a custom board.
3. In the **General Information** panel, change **Debug Mode** to the correct type for your device.  
   ![Changing debug mode in the General Information panel](/ssv6-custom-board-setup/0.1/images/sld498-custom-board-general-information.png)
4. Under the selected adapter in the **Device tree**, select **Detect Target Part**.  
   ![Detect Target Part option in the Device tree](/ssv6-custom-board-setup/0.1/images/sld498-custom-board-detect-part-option.png)
5. If the target device is an **SiWG917** device, select **Check if your target board is based on SiWG917**.  
   ![Detect Target Part dialog for an SiWG917 device](/ssv6-custom-board-setup/0.1/images/sld498-custom-board-detect-part-dialog.png)
6. Select **Detect Target Part**.

> **Note**: To detect a different target device, right-click the detected target in the **Device tree** and select **Reset Hardware Override**. Then run **Detect Target Part** again.

### Configure Debug Sessions in VS Code

The VS Code extension automatically retrieves the debug adapter configuration from Simplicity Device Manager, so no additional setup is typically required to flash and debug a custom board. The debug adapter configured for the custom board appears under **Devices** in the Simplicity VS Code extension.

If the default settings are not sufficient, use the project-specific **Debug Configurator**:

1. Right-click the project folder.
2. Select **Open Configurators 2.0**.  
   ![Open Configurators 2.0 from the project folder](/ssv6-custom-board-setup/0.1/images/sld498-custom-board-debug-1.png)
3. Select **Debug Configurator**.

The standard debug configuration fields are prefilled. Expand the bottom section of the dialog to view optional fields for the debug session, including configuration options for **RTT** and **SWO** terminals.

![Optional RTT and SWO settings in Debug Configurator](/ssv6-custom-board-setup/0.1/images/sld498-custom-board-debug-2.png)

#### Common Settings

- **Break after Reset**: Stops code execution after a reset instead of running to `main`.
- **Run to entry point**: Defaults to `main`, but you can change it for special debugging scenarios.

Enable the **RTT Config** and/or **SWO Config** sections to apply custom settings for those terminals. The default settings are typically sufficient.

## Getting Started

### Installation and Configuration

The Simplicity Studio VS Code extension lets developers build, flash, and debug projects in the Visual Studio Code environment while continuing to leverage Simplicity Studio (version 5 or 6) for project configuration and creation.

This hybrid workflow provides the best of both tools: Use Simplicity Studio to set up your project and VS Code for daily development.

> **Note**: If you have an earlier version of the Simplicity Studio extension installed in VS Code, uninstall it following the steps below before proceeding to ensure a clean installation. Otherwise, continue with the download and installation steps below.

#### Uninstall the VS Code Extension

In the Extension search bar, type "Simplicity Studio" to locate the extension and click the **Uninstall** button.

![Uninstall button](/ss-vscode-getting-started-overview/0.2/images/sld497-uninstall-button.png)

Optional: To ensure there are no leftover settings from a previous installation that could cause issues, you can clear the Silabs settings in the _settings.json_ file by following the steps below.

1. Press Ctrl+Shift+P to open the Command Palette, and then type and select **Preferences: Open User Settings (JSON)**.  
   ![Preferences Open User Settings](/ss-vscode-getting-started-overview/0.2/images/sld497-preferences-user-settings.png)
2. Find and remove the extension settings, and then save the changes.  
   ![Delete settings](/ss-vscode-getting-started-overview/0.2/images/sld497-delete-settings.png)
3. Close and restart VS Code.

#### Download and Install VS Code

Download the latest version of the VS Code application at [https://code.visualstudio.com/download](https://code.visualstudio.com/download) and follow the installation instructions provided there.

#### Install the Simplicity Studio VS Code Extension

Install the Simplicity Studio VS Code Extension directly from the Extensions view in VS Code following the steps below:

> **Important**: Simplicity Studio VS Code extension **v2.0.0** or later is recommended for compatibility with Simplicity Studio 6.

1. Open VS Code.
2. Click the **Extensions** icon on the left navigation bar. A list of installed extensions displays in the **EXTENSIONS** panel at the right of the navigation bar.  
   ![Extensions icon](/ss-vscode-getting-started-overview/0.2/images/sld497-vs-code-extensions-icon.png)
3. In the **Search** field at the top of the **EXTENSIONS** panel, type **simplicity**.  
   ![The Search field at the top of the Extensions panel in VS Code](/ss-vscode-getting-started-overview/0.2/images/sld497-search-field-extensions-panel.png)  
   The extensions display in the search results below the panel.  
   ![The Search field for the Extensions panel in VS Code with the simplicity keyword entered. The Simplicity Studio for VS Code extension displays in the results below the Search field](/ss-vscode-getting-started-overview/0.2/images/sld497-vs-code-extensions-search-results.png)
4. At the bottom right of the **Simplicity Studio for VS Code** extension panel, click the **Install** button.  
   ![The Install button on the bottom right corner of the Simplicity Studio for VS Code extension panel](/ss-vscode-getting-started-overview/0.2/images/sld497-install-button.png)  
   A status bar briefly displays at the top left of your screen while the extension is installed. When the installation is completed, the status bar disappears from the screen.

#### Verify the Simplicity Studio VS Code Extension Configuration

Depending on the VS Code theme used, a solid circle should appear in the lower-right corner, indicating that the extension is connected to Studio 6 and ready to open projects generated from Simplicity Studio 6. For more information on how to start a project, see [Create a Project in the Simplicity Studio v6 User Guide](https://docs.silabs.com/ssv6ug/latest/ssv6-create-project/)

![Connected Simplicity Studio](/ss-vscode-getting-started-overview/0.2/images/sld497-connected-to-ssv6.png)

If you do not see the indicator, or if it appears red, VS Code cannot locate Simplicity Studio. In that case, complete the following steps to verify that the path to the Simplicity Studio tool suite is set correctly, or try closing and restarting VS Code.

1. In the **EXTENSIONS MARKETPLACE** panel, click **Simplicity Studio for VS Code** extension. The extension displays in a tab on the right of your screen.  
   ![The Simplicity Studio for VS Code extension selected in the Extensions Marketplace panel on the left of the screen and the extension displayed in a tab on the right of the screen](/ss-vscode-getting-started-overview/0.2/images/sld497-display-extension.png)
2. In the extension tab, click the **Settings** (cog) icon and select **Settings** from the pop-up menu.  
   ![The Settings icon, shaped like a cog, with a menu displayed where the Settings option is selected](/ss-vscode-getting-started-overview/0.2/images/sld497-settings-menu.png)
3. Verify the path for the Simplicity Studio Tool Suite is correctly set under **Simplicity Studio Configurations**. This path should be automatically synchronized with the latest Simplicity Studio 6 installation.  
   ![Simplicity Studio v6 Configurations](/ss-vscode-getting-started-overview/0.2/images/sld497-ssv6-configuration-option.png)  
   For example, for Simplicity Studio v6, the paths are below:  
   - **Windows**: `c:\Users\<username>.silabs\slt\installs\archive\v6-base-v6.0.0\SimplicityStudio-6`  
   - **macOS**: `/Users/<username>/.silabs/slt/installs/archive/v6-base-v6.0.0/SimplicityStudio-6.app`  
   - **Linux**: `/home/<username>/.silabs/slt/installs/archive/v6-base-v6.0.0/SimplicityStudio-6`

![A path where Simplicity Studio is installed on a Windows machine in the Silabs Tool Suite Installation Path area on the right side of the Extensions tree on the User tab](/ss-vscode-getting-started-overview/0.2/images/sld497-tool-suite-install-path.png)

### Explore the VS Code Extension

After you install the Simplicity Studio for VS Code extension, a Welcome screen displays with getting started instructions for using the extension.

- **Download Simplicity Studio**: Because the extension relies on projects generated and configured by Simplicity Studio, your first task is to download and install [Simplicity Studio 6](https://www.silabs.com/simplicity-studio-v6).
- **Generate a VS Code Project**: Indicates a project must be generated in Simplicity Studio 6 to use the project in the extension.
- **Explore More Resources**: Links are provided for the online user's guide, training, and tutorials.  
  ![The Explore More Resources pane with a list of links to the Simplicity Studio User's Guide, Tips and Tricks, Training and Tutorials, and Silicon Labs Community. A Learn More button is under this list of links.](/ss-vscode-getting-started-overview/0.2/images/sld497-resource-links.png)
- **Ready to Start**: Click the **Si** icon in the left navigation bar to find the heart of the extension functionality.
- **Mark Done**: Click this link to stop the Welcome screen from displaying when you launch the Simplicity Studio VS Code extension.

#### Dependencies for the Simplicity Studio for VS Code Extension

You can view the dependencies for the Simplicity Studio VS Code extension by selecting the extension in VS Code and then clicking the **DEPENDENCIES tab**.  The current dependencies are:

- Cortex-Debug
- C/C++
- C/C++ Themes
- CMake
- YAML

#### Settings for the Simplicity Studio for VS Code Extension

You can explore the extension settings by:

1. Selecting the extension.
2. Clicking the **Settings** (gear) icon and selecting **Settings** from the pop-up menu.  
   The **Settings** tab displays.  
   ![The Settings tab for the Simplicity Studio for VS Code extension. The User tab is open inside the Settings tab by default.](/ss-vscode-getting-started-overview/0.2/images/sld497-settings-tab.png)

Each setting has a description on the **Settings** tab, but only a few important settings are listed below:

- **Build Before Flash**: This setting controls whether a project is built before flashing the target. If you always manually build the project to check for errors before flashing, you can deselect this setting.
- **Device Name**: A custom board setting that lets you override the target part. This is an important setting if the other device detection and configuration options are not working.

#### Si View

The Si View has four possible containers:

- Workspace
- Devices
- Tools
- Learn and Support

![Si View Containers](/ss-vscode-getting-started-overview/0.2/images/sld497-si-view.png)

##### Workspace Container

When you select Si view for the first time, no items have been added to the Workspace container, and so links display to either **Open Simplicity Studio** or **Import Workspace**. If you have not created any projects in Simplicity Studio, click **Open Simplicity Studio** to create one or more projects and.or solutions.

> **Note**: In this context, the term, _project_, refers to projects and solutions, except when discussing explicit solution functionality.

After you create one or more projects, click **Import Workspace** to add the project(s) to the Si Workspace container. Any recently opened workspaces are displayed in the dropdown list. If you do not see them, click **Search** to find your Simplicity Studio projects or workspaces. A Simplicity Studio generated project is considered compatible, if its generator list contains **Visual Studio Code**. This is the default for all Simplicity Studio 6 projects.

###### Workspace Toolbar

The Workspace toolbar has three icons:

![The Workspace toolbar showing the Refresh, Import Workspace, and Settings icons](/ss-vscode-getting-started-overview/0.2/images/sld497-workspace-toolbar-menu.png)

1. **Refresh Workspace**: Click to refresh your workspace when you have made changes to the workspace outside VS Code.
2. **Import Workspace**: Click to import a workspace as described above.
3. **Settings**: Click to display the settings for the Simplcity Studio VS Code extension.

###### Connect and Select Previous Workspaces

Follow these steps to connect and select previous workspaces:

1. Import the Simplicity Studio Workspace.
2. Select a previously connected workspace.  
   - Selecting a previously connected workspace automatically loads the folder content into the workspace view.  
   - Edit the list using **settings**.  
   > **Important**: Only projects and solution generated with _Visual Studio Code_ generator are displayed.
3. Click the **Browse** button to browse the folders for a new workspace.  
   - Selecting a new workspace automatically loads the folder content into the workspace view.    
     ![The contents of a folder loaded into the workspace view after a new workspace is selected](/ss-vscode-getting-started-overview/0.2/images/sld497-import-workspace-choice.png)

###### Workspace Details (heading level 7)

1. **Si icon**: The number in the circle at the lower right corner of this icon shows how many notifications are waiting. These are listed in the tooltip when you hover your pointer over the Si icon.
2. **Tooltip**: This displays when the workspace has changes.
3. **Refresh icon**: Click to update the content in your workspace.

![An example of a workspace showing a list of projects with these features numbered: 1 for the Si icon, 2 for the tooltip, and 3 for the Refresh icon](/ss-vscode-getting-started-overview/0.2/images/sld497-workspace-details.png)

###### Actions for a Displayed Project

The following toolbar icons are available for a displayed project:

- **Build**: If multiple build configurations are present for a project, you must select one build configuration before you build a project.
- **Flash**:  
  - Before executing a flash, you must choose a binary file to flash. Select from .hex, .bin, or .rsp. For binary files that do not contain address information, such as .bin, you should also add a starting memory address.  
  - When multiple compatible devices are connected (see settings: _Board display_), choose one.
- **Debug**:  
  - When multiple compatible devices are connected (see settings: _Board display_), choose one.  
  - When the debug section starts successfully, the **Run and Debug** view displays.  
  - When starting a debug session for the first time, you’ll be prompted to choose one of two startup modes: Run Directly (default) or Device Reset.    
    - **Run Directly**: Sarts code execution from the application’s reset handler, initializing the stack pointer (SP) and program counter (PC) directly from the application’s vector table. This mode does **not** perform a full hardware reset and is recommended for applications with a non-zero boot address, such as those running alongside a bootloader.    
    - **Device Reset** - Performs a full hardware reset before starting the debug session, ensuring the device begins execution from its primary reset vector. This mode is appropriate for standalone applications or when a clean hardware state is required.    
    ![Debug Modes](/ss-vscode-getting-started-overview/0.2/images/sld497-debug-modes.png)  
  - When Debug is launched, a `launch.json` file is created or updated in the `.vscode` folder with information about the Silicon Labs debug session. If you have your own `launch.json` file and want to keep it, the corresponding **Overwrite launch file** setting should be turned off.  
  - To monitor variables and expressions while the target continues to run, see [Monitor Live Expressions During Debug](sld498-ss-vscode-projects-build-flash-debug-project#monitor-live-expressions-during-debug).    
    ![An example of a workspace showing the action icons at the right of a project folder in this order from left to right: Build, Flash, and Debug](/ss-vscode-getting-started-overview/0.2/images/sld497-project-toolbar.png)

###### Actions for a Displayed Solution

The following actions are available for a displayed solution:

- **Build**: In this version only, one build configuration is available for a solution.
- **Flash**:  
  - Before executing a flash, you must choose a binary file to flash.  
  - When multiple compatible devices are connected (see settings: _Board display_), choose one.
- **Debug**:  
  - When multiple compatible devices are connected (see settings: _Board display_), choose one.    
    - When starting a debug session for the first time, you’ll be prompted to choose one of two startup modes:**Run Directly** (default) or **Device Reset**.      
      - **Run Directly**: Sarts code execution from the application’s reset handler, initializing the stack pointer (SP) and program counter (PC) directly from the application’s vector table. This mode does **not** perform a full hardware reset and is recommended for applications with a non-zero boot address, such as those running alongside a bootloader.      
      - **Device Reset** - Performs a full hardware reset before starting the debug session, ensuring the device begins execution from its primary reset vector. This mode is appropriate for standalone applications or when a clean hardware state is required.      
      ![Debug Modes](/ss-vscode-getting-started-overview/0.2/images/sld497-debug-modes.png)  
  - When the debug section starts successfully, the **Run and Debug** view displays.  
  - When Debug is launched, a `launch.json` file is created or updated in the `.vscode` folder with information about the Silicon Labs debug session. If you have your own `launch.json` file and want to keep it, the corresponding **Overwrite launch file** setting should be turned off.  
  ![An example of a solution in a workspace showing the aciton icons at the right of the solution name in this order from left to right: Build, Flash, and Debug](/ss-vscode-getting-started-overview/0.2/images/sld497-solution-toolbar-actions.png)

###### Context Menu for a Project Folder

Right-click a project folder to display a context menu with the following actions:

![Context Menu](/ss-vscode-getting-started-overview/0.2/images/sld497-content-menu.png)

1. **Add new file or folder to the selected folder**  
   - When you select this action, an additional input dialog displays.  
   - If the text input contains a file extension, a file is created; otherwise, a folder is added.  
   - You cannot add a folder or file to the top-level folder of a solution.
2. **Clean**: Does a clean build of the project.
3. **Build**: Builds the project.
4. **Flash**: Flashes the project binary to the target.
5. **Debug**: Launches the debugger for the project.
6. **Open Configurators 2.0**: Opens the configurators screen with the following sections:  
   - **Additonal Sources**: Adds files and folders previously added to the project to the build configuration.    
     ![Additional Sources](/ss-vscode-getting-started-overview/0.2/images/sld497-additional-sources.png)    
     - **Folder Name**: Adds a source file folder to the build configuration.    
     - **File Path**: Adds include file paths to the build configuration. The added path is searched for header files included by source files.  
   - **Build Configurator**: Adjusts the build configurations.    
     ![Build Configuration](/ss-vscode-getting-started-overview/0.2/images/sld497-build-configurator.png)    
     - **Configurations**: Selects an existing build configuration to edit or rename, add, copy, or delete a configuration.    
     - **Definition** (build symbols)      
       - Edit or delete an existing definitions.        
         - Add new definitions.    
     - **Compiler Flags**: Add, edit or delete compiler flags for C, CPP, or ASM.    
     - Save your changes.  
   - **Debug Configurator**: Adjusts the debugger configuration.    
     The debug configuration is created automatically with default settings for the project. The Debug Configurator lets you change the settings manually.    
     - Select from the available debug configurations to edit.    
     - Rename, add, copy, or delete a debug configuration.    
     ![A list of the debug configurator fields](/ss-vscode-getting-started-overview/0.2/images/sld497-debug-configurator-fields.png)    
     - **Debug Configurator Fields**      
       - **CWD**: The current working directory or workspace folder.      
       - **Device**: The debug device name, it may be different than the actual device OPN depending on currently supported J-Link support. The default setting should be compatible with J-Link.      
       - **Executable**: The debugger-compatible project binary file [i.e., a binary file with executable and linking format (ELF) debug information].      
       - **GDB Path**: The path to the arm gdb client.      
       - **RTOS**: The real-time operating system (RTOS) used by the project, if any. This loads the GDB RTOS plugin for the debug session.      
       - **Request**: Launch      
       - **SVD File**: The special function register (sfr) file for the debugger debug device (target). This file should be downloaded automatically by the extension based on the project properties.      
       - **Server path**: The path to the GDB server.      
       - **Server type**: J-Link, the only server type currently supported.      
       - **Show dev debug output**: The format to use in the output in the Packet Trace Interface (PTI) debug console.      
       - **Type**: The debug configuration type. Currently `cortex-debug` is the only supported debug configuration type.      
       - **Arm Toolchain path**: Use to override the default toolchain path.      
       - **Enable live watch**: Enables live expression updates in the **CORTEX LIVE WATCH** section during a debug session.      
       - **Break After Reset**: If **Run to entry point** is blank, select this option to stop the debugger after a device is reset.      
       - **IP address**: The IP address for the networked J-Link debug adapters.      
       - **Run to entry point**: The initial breakpoint for the debug session. The default is **run to main**.      
       - **Serial Number**: The serial number for the USB-connected debug adapters. This is when multiple debug adapters are connected to the computer.
7. Save your debug configurator changes.

###### Context Menu Within a Project

When you are in a project, right-click a folder to display a context menu with the following actions:

1. **New File / Folder here**: Adds a new file or folder to the selected folder.  
   - When you choose this, an additional input dialog displays.  
   - If a text input contains a file extension, a file is created; otherwise, a folder is added.  
   - You cannot add a folder or file to the top-level folder of a solution.
2. **Rename**: Changes the name of a selected folder.  
   - You can rename projects and solutions in Simplicity Studio only.  
   - You can rename sub-projects of a solution in Simplicity Studio only.  
   - Renaming a folder generated in Simplicity Studio may cause the project to malfunction.
3. **Delete**: Deletes a selected folder.  
   - You can delete projects and solutions in Simplicity Studio only.  
   - You can delete sub-projects of a solution in Simplicity Studio only.  
   - Deleting a folder generated in Simplicity Studio may cause the project to malfunction.

![A context menu in a project with these three options in this order from top to bottom: New File Folder here, Rename, and Delete](/ss-vscode-getting-started-overview/0.2/images/sld497-context-menu-in-project.png)

###### Context Menu for a Source File

Right-click a source file to open a context menu with the following actions:

1. **Rename**: Changes the name of the selected file.  
   Renaming a file generated in Simplicity Studio may cause the project to malfunction.
2. **Delete**: Deletes the selected file.  
   Deleting a file generated in Simplicity Studio may cause the project to malfunction.

![A context menu for a source file with these two options in this order from top to bottom: Rename and Delete](/ss-vscode-getting-started-overview/0.2/images/sld497-context-menu-source-file.png)

###### File-specific Context Menu

Right-click a Simplicity Studio 6 tool or project file to open a file-specific context menu that may include opening it in Simplicity Studio 6 or in a text editor.pintool file.

Show the selected file in VSC Explorer by moving the focus to the selected file in the VSC Explorer view.

Successfully built configuration under the project

1. From the project folder toolbar, click the **Flash** icon.  
   - Before executing a flash, you must choose a binary file to flash. Select from .hex, .bin, or .rsp. For binary files that do not contain address information, such as .bin, you should also add a starting memory address.  
   - When multiple compatible devices are connected (see settings: _Board display_), choose one.
2. From the project folder toolbar, click the **Debug** icon.  
   - When multiple compatible devices are connected (see settings: _Board display_), choose one.  
   - When the debug section starts successfully, the **Run and Debug** view displays.  
   - When Debug is launched, a `launch.json` file is created or updated in the `.vscode` folder with information about the Silicon Labs debug session. If you have your own `launch.json` file and want to keep it, the corresponding **Overwrite launch file** setting should be turned off.  
   ![A file-specific context menu showing four files: bt_soc_blinky.bin, bt_soc_blinky.gbl, bt_soc_blinky.hex, and bt_soc_blinky.s37](/ss-vscode-getting-started-overview/0.2/images/sld497-debug-binary-file-selection.png)

#### Status Bar

When you select a file from an opened project in VS Code explorer, the shortcuts to build, flash, and debug display in the status bar with the project name that contains the file you selected.

1. A file selected in the EXPLORER panel of VS Code
2. Shortcuts to build, flash and debug

![A file selected in the Explorer panel of VS Code and the Build, Flash, and Debug icons highlighted in the toolbar at the bottom left of the screen](/ss-vscode-getting-started-overview/0.2/images/sld497-status-bar.png)

You can initiate these by one or more additional input steps, depending on the number of opened projects and the number of connected devices.

## Projects Guide

### Projects Guide

The Simplicity Studio VS Code extension lets you build, flash, and debug Simplicity Studio v6- and v5-generated projects.

This section provides details on adding a project to VS Code and various project configurations.

Topics include creating and importing projects, building and debugging, and terminal support.

### Create a New Project

Start by creating a project in Simplicity Studio.

1. Follow the steps in the Studio v6 Project Generation guide for [VS Code IDE](https://docs.silabs.com/ssv6ug/latest/ssv6-open-project/#open-a-project-in-visual-studio-code/)
2. When prompted, target the project for VS Code.

After creation, the project will auto-load in VS Code under the Simplicity Workspace (Si) extension view.

### Import/Open an Existing Project

You can add a project to VS Code in three ways.

1. Use **File /> Open Folder…**. Browse to the Simplicity Studio project folder.
2. Use **File /> Add Folder to Workspace…**. Recommended for managing multiple projects. Then save the workspace using **File > Save Workspace As…** to a non-Studio folder.
3. Use **Silabs Workspace /> Connect to Simplicity Workspace**.

### Build, Flash, or Debug a Project

In the Si extension view, hover over your project to reveal the following action buttons:

- **Build**: Compiles your project
- **Flash**: Programs your target device
- **Debug**: Launches the debugger

![Build, Flash, and Debug icons](/ss-vscode-projects/0.2/images/sld498-build-flash-debug-icons.png)

#### Monitor Live Expressions During Debug

Live Expressions let you monitor variables and expressions while the target application continues to run. In the Debug Configurator, this feature is labeled **Enable live watch**. During a debug session, live expressions are shown in the **CORTEX LIVE WATCH** section of the **Run and Debug** view.

This procedure assumes that your project builds successfully and that you have a configured debug connection to a Silicon Labs target device.

##### Enable Live Watch

1. Right-click the project folder and select **Open Configurators 2.0**.
2. Select **Debug Configurator**.
3. Select the debug configuration you want to edit.
4. In the optional fields, select **Enable live watch**.
5. Save the debug configuration.

![Live Expressions configuration](/ss-vscode-projects/0.2/images/sld498-live-expressions-config.png)

##### Add a Live Expression

1. Build the project.
2. Start a debug session.
3. In the **Run and Debug** view, expand **CORTEX LIVE WATCH**.
4. Select **Add Expression**, enter the variable or expression that you want to monitor, and press **Enter**.
5. Let the application continue running and observe the value in **CORTEX LIVE WATCH**.

![Cortex Live Watch panel](/ss-vscode-projects/0.2/images/sld498-live-expressions-panel.png)

Use live expressions to monitor runtime values such as timer values, event flags, counters, state-machine variables, and application status values.

#### Attach to a Running Target

The Simplicity Studio VS Code extension does not currently provide a built-in option to attach to a running target. However, this is supported through the Cortex-Debug extension by adding an attach configuration to the project’s `launch.json` file.

This procedure assumes you have debugged the project at least once so that `.vscode/launch.json` exists.

##### Attach the Configuration

1. In the Si Activity bar, open your project's `.vscode/launch.json` file.
2. In the `configuration[]` array, select and copy the existing launch configuration (typically from the opening bracket (`{`) on line 3 through the closing bracket (`}`) for that block).  
   ![Select Existing Configuration](/ss-vscode-projects/0.2/images/sld498-select-existing-configuration.jpg)
3. Paste the copy after the existing configuration. Use it as the starting point for your attach configuration.
4. In the copied configuration block, change `debug` in the name to `attach`. You can use any name, but it should show that this entry is for an attach configuration.
5. Change `request` from `launch` to `attach`.
6. Delete the `runtoEntryPoint` line.
7. Delete the `preLaunchTask` line.
8. Change `breakAfterReset` from `true` to `false`.
9. If they are present, delete the `overrideLaunchCommands` and `overrideResetCommands` sections.
10. By default, attach halts the processor so you can inspect the target state and set breakpoints. To attach without halting, add a `postAttachCommands` entry:  
    ```json  
      "postAttachCommands": ["continue"]  
    ```  
    > **Note:** If you use `continue`, the processor does not stop at attach. The **Pause** button does not work until you set a breakpoint and hit it. After that, **Pause** works when you resume.
11. Save the file.

##### Use an Attach Configuration

From the **Silicon Labs** Activity Bar (Si), select the debug icon. A drop-down lists every configuration in `launch.json`, including your attach configuration.

Do not use the Si extension toolbar debug icon to start an attach session. Instead, open the **Run and Debug** view from the activity bar and select your attach configuration from the dropdown.

![Select Attach Configuration](/ss-vscode-projects/0.2/images/sld498-selecting-attach-configuration.jpg)

Select **Start Debugging (F5)** (green arrow) to attach to the running target.

### Terminal Support

The debugger supports multiple device interfaces, including SWO, RTT, and VCOM for terminal.

![terminal support](/ss-vscode-projects/0.2/images/sld498-terminal-support.png)