• HOME
  • INTEGRATIONS
  • SDK
  • API DOCS
No results for ""
EXPAND ALL
CLOSE
launchdarkly.com

EDIT ON GITHUB

Visual Studio Code (VSCode)

Read time: 1 minute
Last edited: Feb 3, 2020

Overview

This topic explains how to use the LaunchDarkly VSCode extension to interact with feature flags from within VSCode.

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

  • See 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)

Installing the VSCode extension

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

Extension settings

You can configure the extension with the following settings:

>
SettingDescriptionDefault Value
launchdarkly.sdkKeyRequired
Your LaunchDarkly SDK key.
Find in Account Settings
launchdarkly.accessTokenRequired.
Your LaunchDarkly API access token.
Find in Account Settings
launchdarkly.projectRequired.
Your LaunchDarkly project key, should match the provided SDK key.
Find in Account Settings
launchdarkly.envYour LaunchDarkly environment key, should match the provided SDK key.Production
launchdarkly.baseUriOptional.
The LaunchDarkly base uri to be used.
https://app.launchdarkly.com
launchdarkly.streamUriOptional.
The LaunchDarkly base uri to be used.
https://stream.launchdarkly.com
launchdarkly.enableHoverEnables flag info to be displayed on hover of a valid flag key.true
launchdarkly.enableAutocompleteEnable flag key autocompletion.true

Here's an example setting configuration with quick suggestions enabled:

1{
2 "launchdarkly.accessToken": "api-xxx",
3 "launchdarkly.sdkKey": "sdk-xxx",
4 "launchdarkly.project": "default",
5 "launchdarkly.env": "production",
6 "editor.quickSuggestions": {
7 "other": true,
8 "comments": false,
9 "strings": true
10 },
11}