Skip to content

Latest commit

 

History

History
95 lines (61 loc) · 2.83 KB

README.md

File metadata and controls

95 lines (61 loc) · 2.83 KB

Pyrsia VS Code Extension

Overview

Pyrsia support for Microsoft VS Code (extension).This is an early prototype and proof of concept, it’s not "production" ready.

Requirements

  • VS Code 1.7
  • Node 19.x required

How to run and debug the extension

  • Open the repo folder in VS Code.

  • Install the dependencies and compile the extension.

    npm install
    npm run watch
  • Open VS Code, in the Activity Bar select "Run and Debug" and make sure the "Lunch Extension" configuration is selected.

  • Press F5 to run the Pyrsia extension (debug mode), a new VS Code instance will appear and should have the Pyrsia extension installed (should be shown in the Activity Bar).

How to test the project (and debug the tests)

npm run test

To debug the tests, in the Activity Bar select "Run and Debug" and make sure the "Lunch Tests" configuration the active one, press F5 to start the tests.

Before merging or creating PR

  • Run the tests and linter.

    npm run compile
    npm run lint
    npm run test

How to package, install and uninstall Pyrsia extension in the IDE

The Pyrsia extension is not yet listed in the VS Code marketplace. For now it can still be installed manually following the instructions outlined below.

Install extension (side-load extension)

  • Download the latest version of the extension (vsix file) from the project release page.

  • Close the IDE and install the extension using the vsix file downloaded in the previous step.

    code --install-extension <PYRSIA_VSIX_FILE_PATH>

Build package and install extension from the local repository (side-load extension)

  • Install Visual Studio Code Extensions with the following command.

    npm install -g @vscode/vsce
  • Package the extension in the extension repository folder as follows.

    vsce package --allow-star-activation --ignoreFile .vscodeignore --pre-release
  • If the packaging was successful the last line of the VSCE logs should contain the vsix file path, for example:

    DONE  Packaged: /home/joed/repositories/pyrsia-vscode-extension/pyrsia-integration-0.0.1.vsix (960 files, 2.2MB)
  • Close the IDE and install the extension using the vsix file path from the previous step.

    code --install-extension <PYRSIA_VSIX_FILE_PATH>

Uninstall (side-load)

  • Find the extension in the list of the extensions (look for "pyrsia", for example undefined_publisher.pyrsia-integration).

    code --list-extensions
  • Use the extension name from the list to uninstall the extension.

    code --uninstall-extension <PYRSIA_EXTENSION_NAME>