Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/launchdarkly/ld-vscode

VSCode extension for LaunchDarkly
https://github.com/launchdarkly/ld-vscode

feature-flags feature-toggles launchdarkly typescript vscode vscode-extension

Last synced: 3 months ago
JSON representation

VSCode extension for LaunchDarkly

Lists

README

        

# LaunchDarkly for Visual Studio Code

[![Version](https://img.shields.io/visual-studio-marketplace/v/launchdarklyofficial.launchdarkly?style=for-the-badge&colorA=2c2c2c&colorB=23328c)](https://marketplace.visualstudio.com/items?itemName=launchdarklyofficial.launchdarkly)
[![Installs](https://img.shields.io/visual-studio-marketplace/i/launchdarklyofficial.launchdarkly?style=for-the-badge&colorA=2c2c2c&colorB=23328c)](https://marketplace.visualstudio.com/items?itemName=launchdarklyofficial.launchdarkly)
[![Downloads](https://img.shields.io/visual-studio-marketplace/d/launchdarklyofficial.launchdarkly?style=for-the-badge&colorA=2c2c2c&colorB=23328c)](https://marketplace.visualstudio.com/items?itemName=launchdarklyofficial.launchdarkly)
[![Ratings](https://img.shields.io/visual-studio-marketplace/r/launchdarklyofficial.launchdarkly?style=for-the-badge&colorA=2c2c2c&colorB=23328c)](https://marketplace.visualstudio.com/items?itemName=launchdarklyofficial.launchdarkly)

The LaunchDarkly VSCode extension provides utilities that make it easy to work with feature flags using LaunchDarkly without ever leaving VSCode. See details about feature flags defined in your code, toggle them on or off, search for usage, see all possible flag variations and more.

screenshot

## Features

- Feature flag details tooltip on hover
- Flag name autocomplete
- Open feature flags in LaunchDarkly (Default keybind: `ctrl+alt+g`/`⌘+alt+g`)
- [Feature flag explorer](#feature-flag-explorer): view a list of your feature flags and their settings in the explorer view
- [Create Boolean Flag](#create-boolean-flag)
- [Flag Actions](#flag-actions-command)
- [Quick Links](#quick-links) to LaunchDarkly
- [Flags in File](#flags-in-file)
- [Flag Lens](#flag-lens)

Read our official documentation about this extension at

### Hover
Show LaunchDarkly feature flag information right in your code. Anywhere a feature flag key is wrapped in string delimiters or if your application leverages [Code References](https://docs.launchdarkly.com/home/code/code-references) you can find aliases throughout the code base and a informational hover will appear when you mouseover them.

Hover in code

### Create Boolean Flag
*Using Command Palette (CMD/CTRL + Shift + P)* → `LaunchDarkly: Create Boolean Flag`

Create a boolean feature flag and have it automatically copied to your clipboard without leaving VSCode.

Information required:
* Flag name
* Flag key, name from step 1 will convert to a flag key in the same format as the LaunchDarkly UI handles it.
* SDK Availability

Create feature flag command

### Flag Actions Command
Use the `LaunchDarkly: Flag Actions` command to bring up a menu of options that you can choose from to interact with your feature flags.

![Flag Actions](images/flag-actions.png)

### Toggle Feature Flag
Change the enabled state of a feature flag without moving your hands from your keyboard.

*Using Command Palette (CMD/CTRL + Shift + P)* → `LaunchDarkly: Toggle Flag`

You can select from a list of all the feature flags in the project. The most recently toggled feature flags will be at the top of the list.

Toggle feature flag command

### Quick Links
Each link to will open your browser to specific pages in LaunchDarkly UI.

Quick links sidebar

### Flags in File
List of all flags found in the file. Added/Removed flags will not show until switching to another file and back.

Flags in file sidebar

### Feature Flag Explorer
The feature flag explorer will automatically refresh whenever environment-specific configuration updates are made, like turning on your flag or adding a rule. For any changes that affect all environments, such as adding tags, the explorer can be manually refreshed.

New flags will automatically be added to the end of the feature flag list until next reload of the application.

Feature flag explorer sidebar

Flag names in the treeview can be right-clicked where you can update a flag's state, default rule when on, and default off variation

right click menu options

### Flag Lens
The Flag Lens functionality shows insights about the usage and status of LaunchDarkly feature flags directly in the code. For a given feature flag in the codebase, the Flag Lens displays:

__Flag Name__: The feature flag's name as it appears in LaunchDarkly.
__Flag Status__: Whether the flag is currently enabled or disabled.
__Variation Information__: Which variation or value of the flag is currently being served.

This is OFF by default. It can be enabled through Settings > LaunchDarkly Extension > Enable Flag Lens.

## Contributing

LaunchDarkly for Visual Studio Code is an [open source project](https://github.com/launchdarkly/ld-vscode). If you experience any issues, please [log an issue on our issue tracker](https://github.com/launchdarkly/ld-vscode/issues). If you'd like to contribute, we're happily taking pull requests.