How to work with multiple applications - nRF Connect for VS Code
Skip to content

How to work with multiple applications

The extension lets you work with multiple applications without the need for a multi-root workspace. You can see the list of applications associated with the current workspace in the Applications View.

In the Applications View, the currently active application has its name highlighted. By default, the active application and its active configuration changes with every file you open or edit in the active editor window, if the file is in an application's directory or belongs to a build directory. You can change this behavior in the nrf-connect.activeAppFollowActiveEditor configuration setting.

Caution

How to add multiple applications

You can add additional applications to the list using the following actions:

  • Open an existing application from the Welcome View.
  • Create a new application from the Welcome View.
    This option adds the application to the VS Code workspace.
  • Click on the plus sign icon in the Applications View.

    Add an application with the plus sign icon

  • Right-click on an application's folder and chose nRF Connect: Add Folder As Application in the Explorer (Ctrl-Shift-E).

    Add an application from the context menu

  • Select File > Add Folder to Workspace from the main VS Code interface.

    Add an application from the file menu

How to recover unsaved applications

If you have made changes to your application without saving the workspace settings, these changes can be restored.

VS Code will never remove any of the build configurations on its own. However, as the list of applications in your workspace is stored in the workspace settings, VS Code will lose track of them if you exit without saving. When you reopen the unsaved workspace, your application and build configurations will not appear in the Sidebar.

To restore an application:

  1. Create a new workspace.
  2. In the Welcome View, click on Open an existing application.
  3. Choose the folder where your application is stored.

The application will reappear in the Applications View.

How to remove applications

The extension will never remove the application files from your machine.

To remove the application from your workspace, complete the following steps:

  1. In the Applications View, hover over the application you want to remove.
  2. Click the More actions... button.
    A drop-down menu appears.
  3. Click Remove Application action.
    At this point, the application will be removed from the Applications View (the nrf-connect.applications setting).
  4. If a notification appears asking you to remove the workspace folder of the application, click Remove folder from workspace.
    This notification appears only if the application is a workspace folder, and you need to remove the folder in such cases.