Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>pnpm-variablesNew to Visual Studio Code? Get it now.

pnpm-variables

Daniel Jakobsen

|
155 installs
| (0) | Free
Variable substitution for pnpm related commands to be used in launch.json & tasks.json
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

pnpm-variables README

"pnpm-variables" extension. provides variable substitution commands for launch.json

Features

Command pnpm-variables.root

In a launch.json add testFile property pointing to the file you want to debug

And then you can use ${command:pnpm-variables.root} that will point to the relative pnpm node_modules of that file

Example configuration

{
  "name": "Vitest File",
  "program": "${command:pnpm-variables.root}/vitest/vitest.mjs",
  "testFile": "${file}",
  "args": ["${file}"],
  "cwd": "${command:pnpm-variables.root}/..",
  "request": "launch",
  "skipFiles": ["<node_internals>/**"],
  "type": "node"
}

Requirements

Require pnpm to be installed in the host machine

Known Issues

Calling out known issues can help limit users opening duplicate issues against your extension.

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft