Files
Viper_VSCode/docs/build-debug.md
T
TermiNexus 44d83f4235
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
Run mypy_primer on push / Run mypy_primer on push (push) Has been cancelled
"chore: migrate Pyright branding to Vipeye/vipeye across docs and tooling
- Rewrite root README and docs for Vipeye
- Rename pyright-test-policy to vipeye-test-policy
- Update CI/Azure pipelines, perfCompare.py and package metadata
- Keep upstream links, external tool params and # pyright: ignore compat"
2026-08-07 03:33:29 +08:00

2.4 KiB

Building Vipeye

To install the dependencies for all packages in the repo:

  1. Install nodejs version 16.x
  2. Open terminal window in main directory of cloned source
  3. Execute npm run install:all to install dependencies for projects and sub-projects

Building the CLI

  1. cd to the packages/vipeye directory
  2. Execute npm run build

Once built, you can run the command-line tool by executing the following:

node index.js

Building the VS Code extension

  1. cd to the packages/vscode-vipeye directory
  2. Execute npm run package

The resulting package (vipeye-X.Y.Z.vsix) can be found in the client directory. To install in VS Code, go to the extensions panel and choose “Install from VSIX...” from the menu, then select the package.

Running Vipeye tests

  1. cd to the packages/vipeye-internal directory
  2. Execute npm run test

Debugging Vipeye

To debug vipeye, open the root source directory within VS Code. Open the debug sub-panel and choose “Vipeye CLI” from the debug target menu. Click on the green “run” icon or press F5 to build and launch the command-line version in the VS Code debugger. There's also a similar option that provides a slightly faster build/debug loop: make sure you've built the vipeye-internal project e.g. with Terminal > Run Build Task > tsc: watch, then choose “Vipeye CLI (Vipeye-internal)”.

To debug the VS Code extension, select “Vipeye extension” from the debug target menu. Click on the green “run” icon or press F5 to build and launch a second copy of VS Code with the extension. Within the second VS Code instance, open a viper source file so the vipeye extension is loaded. Return to the first instance of VS Code and select “Vipeye attach server” from the debug target menu and click the green “run” icon. This will attach the debugger to the process that hosts the type checker. You can now set breakpoints, etc.

To debug the VS Code extension in watch mode, you can do the above, but select “Vipeye extension (watch)”. When vipeye's source is saved, an incremental build will occur, and you can either reload the second VS Code window or relaunch it to start using the updated code. Note that the watcher stays open when debugging stops, so you may need to stop it (or close VS Code) if you want to perform packaging steps without the output potentially being overwritten.