Clone this repo:

Branches

  1. cd1a88f Include THIRD_PARTY_NOTICES.txt by Solly Ross · 3 days ago main
  2. 57bad0f Merge "[typo] Update 'Ffx' in log message to 'ffx'." into main by Solly Ross · 3 days ago
  3. 521c753 [ffx][log] Update class name by Miguel Flores Ruiz de Eguino · 6 days ago
  4. e6bef41 [logging] Send ffx log stderr to the output channel by Miguel Flores Ruiz de Eguino · 6 days ago
  5. 5882f53 [typo] Update 'Ffx' in log message to 'ffx'. by Matt Hamrick · 7 days ago

Fuchsia extension for VS Code

What does it do?

The Fuchsia VS Code extension integrates the commonly needed tasks for Fuchsia development into VS Code.

This is a Work In Progress Currently supporting:

  • Commands for:
    • Saying Hello
    • Submitting Feedback to the issue tracker
  • A Fuchsia View container
    • List of Fuchsia targets.
  • Configuration parameters

Getting started

VS Code extension development requires Node.js. Our development workflow has been tested with 1.17.9, but newer versions should work. Older versions may break.

You can install a recent copy of Node by any of the following

a. Downloading Node from its website and placing it on your PATH b. Downloading Node via nvm c. Downloading Node from CIPD and placing it on your PATH

Read about extensions, concepts and guides: https://code.visualstudio.com/api/get-started/extension-anatomy.

To run the extension:

  • Open this directory in VS Code
  • Open the terminal window and run npm install vsce
  • Click “Run”. This will open another instance with the extension installed.

Settings

FFX path

The FFX path can be set under Settings > Extensions > Fuchsia SDK. If a path is not set, the extension will automatically search and set it if it can find it at:

  • tools/ffx
  • .jiri_root/bin/ffx

Packaging the extension

  • cd to vscode-plugins (This directory).
  • git clean -xdf [^3] (WARNING: this will delete everything not tracked by git)
  • npm ci [^1]
  • npm test
  • npx vsce package [^2]

Sharing internal to Google

Note: We‘re working on build and publish workflow that complies with Google’s internal practices. It is coming soon to the extension marketplace.

In the meantime, Googlers building the extension, please copy it to

$ cp vscode-fuchsia-0.0.2.vsix /google/data/rw/teams/tq-devrel/vscode-extensions/

Questions? Let us know: fuchsia-editor-team@

Related extensions

  • clangd for C++ development.
  • bazel for the Bazel build system.

[^1]: npm ci is like npm install, except that it re-downloads a clean copy of the node_modules directory using package-lock.json and errors out if package-lock.json ii out of sync with package.json

[^2]: npx runs commands from npm packages without having to globally install them

[^3]: this cleans out any files that are not tracked by git, to ensure we have a clean build, in case we missed anything in our .vscodeignore