• Home
  • Integrations
  • SDKs
  • Guides
  • API docs
No results for ""


Visual Studio Code (VSCode)

Read time: 1 minute
Last edited: Jun 15, 2022
The VSCode extension is a Pro and Enterprise feature

The VSCode extension is available to customers on a Pro or Enterprise plan. To learn more, read about our pricing. To upgrade your plan, contact Sales.


This topic explains how to use the LaunchDarkly VSCode extension to interact with feature flags from within Visual Studio Code (VSCode).

With the extension, you'll get the ability to:

  • Display a tooltip with feature flag details when you hover over a feature flag key in your source code
  • Autocomplete feature flag keys
  • Open feature flags in LaunchDarkly (Default keybinding: ctrl+alt+g/⌘+alt+g)
  • View a list of feature flags and their settings in the Explorer view
  • Update a flag's state, default rule when on, and default off variation
  • Enable codelens for flags in your source code
The LaunchDarkly VSCode extension
The LaunchDarkly VSCode extension
Treeview right click options
Treeview right click options

Installing the VSCode extension

To install the VSCode extension, visit the Visual Studio Marketplace.


To configure the VSCode extension, you must have a valid access token that targets version 20210729 of our API.

You can create a new access token on the Account settings page, on the Authorization tab. The access token must have sufficient permissions to support the extension's functionality. To learn more, read Creating API access tokens.

The following is an example policy which allows Reader access to all projects and Writer access to the minimal set of fields the extension is able to update:

"effect": "allow",
"actions": ["viewProject"],
"resources": ["proj/*"]
"effect": "allow",
"actions": [
"resources": ["proj/*:env/*:flag/*"]

After you install the LaunchDarkly extension, VSCode prompts you to configure it:

  1. Provide an access token for your LaunchDarkly account. This access token must have sufficient permission as described above.
  2. Select your corresponding LaunchDarkly project.
  3. Select your corresponding LaunchDarkly environment.
  4. Select whether you want the extension to work with all VSCode workspaces or just the current workspace.

You can reconfigure the extension at any time by running the "LaunchDarkly: Configure" command from the command palette (ctrl+shift+p/⌘+shift+p).

Code references in the VSCode extension

The LaunchDarkly VSCode extension supports code references. If you use code references, configuring aliases makes the informational hover available wherever an alias appears in your code. Aliases appear under the flag entry in the Explorer view. To learn more, read Finding flag aliases.

Flag searches across the workspace also include flag references.