Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 3.83 KB

CONTRIBUTING.md

File metadata and controls

38 lines (24 loc) · 3.83 KB

Contributing

Thank you so much for being interested in contributing to our project! Before submitting your contribution, please read the following guidelines.

Initial project setup

  1. Ensure you have yarn setup on your machine (see more details here)
  2. Run yarn install to install dependencies.
  3. Run yarn bundle to bundle all the code in the shared package for use in the client and extension packages.
  4. Run yarn mvn:prepare to collect necessary build artifacts (download the LSP jars, etc.).

How to debug the VSCode extension during development

  1. Make necessary changes to the code.
    • If you changed any code in the shared package, make sure to run yarn bundle again.
  2. If there are new versions of the LSP jars you need to use, make sure to run yarn mvn:prepare again.
  3. Run yarn webpack to generate the output files for running the extension.
  4. Navigate to packages/extension/dist/extension.js and press F5 in your VSCode IDE to launch a debugging session of the extension. Ensure that your VSCode IDE is using the launch.json file provided in the repo.

Note that extension.js must be opened in the active editor, else VSCode will not be able to find the extension to debug

Alternatively, you can use the Run and Debug menu in VSCode, ensure the Launch Legend Extension configuration is selected, and click the Start Debugging button.

If the extension errors out related to storageUri.fsPath, make sure in the debug workspace, open a folder: the above error usually happens the first time debug is on and no workspace folder is specified.

  1. You can now place breakpoints on any code in the extension package..

Any console.log will output in DEBUG CONSOLE tab in VSCode; while runtime log message will be output to corresponding channels in the debugger instance.

  1. If you make changes to the code, rerun yarn webpack and restart the debugger to have the changes in effect.

Project Structure

The project is structured into 3 packages within the repo: