Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Latest commit

 

History

History
51 lines (32 loc) · 3.09 KB

developing.md

File metadata and controls

51 lines (32 loc) · 3.09 KB

Developing

Repository Structure

This repository uses lerna combined with yarn workspaces to organize itself.

The overall extension is broken out into several packages within the packages directory:

Each package utilizes esbuild or tsc to build the dist directory.

Packages that use esbuild are consumed directly by VS Code. VS Code does not run npm install for packages and thus any code must make sure its dependencies are bundled alongside it.

Packages that just use tsc are dependencies of other packages.

Getting Started

  • Clone the repo
  • run yarn install
  • run yarn watch

yarn watch will symlink the dist directories from the required packages and start esbuild (via lerna) in each package. You can look at the scripts/link-dist.sh script to see what is happening there.

Developing

The root package.json for the extension depends on the appropriate code being present in the root dist directory. The yarn watch script above will take care of that for you.

Debugging

There are several debug profiles defined in launch.json:

  • Launch Extension - this will launch the VS Code extension in a new isntance of VS Code. This will temporarily overwrite any extensions by the same name that are installed
  • Attach to Language Server - this will attached to the running language server which will allow you to set breakpoints
  • Debugger Server - this will start a server that will allow you to debug the debugger package

Running Tests

Each package should have a yarn test script defined. You can run all tests for the whole repository with the root yarn test command.

Resources