Skip to content
| Marketplace
Sign in
Visual Studio Code>Testing>Vitest LabNew to Visual Studio Code? Get it now.
Vitest Lab

Vitest Lab

Preview

Milan Kovacic

|
1,107 installs
| (4) | Free
Run and debug Vitest test cases
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Vitest extension for Visual Studio Code


Features

  • Run/debug vitest tests in vscode
  • Watch mode is supported 🎊. Test reruns are blazing fast

Watch Mode

Requirements

  • Visual Studio Code >= November (version 1.85.0).
  • Vitest >= 1.0.0

Configuration

  • vitest.include and `vitest.exclude`` are deprecated. The extension now loads the include and exclude paths from your vitest config file.
  • vitest.enable: This plugin will try to detect whether the current project is set up with Vitest to activate itself. If detection fails, you can enable the plugin manually.
  • vitest.nodeEnv: The env passed to runner process in addition to process.env
  • vitest.commandLine: The command line to start vitest tests. It should have with the ability to append extra arguments. For example npx vitest or yarn test --.(This is a workspace setting. Do not change it in the user setting directly, which will affect all the projects you open)
  • vitest.debugExclude: Automatically skip files covered by these glob patterns. Default: [\"<node_internals>/**\", \"**/node_modules/**\"]

Frequently Asked Questions

How can I use it in monorepo?

See https://vitest.dev/guide/workspace.html for monorepo support.

How can I use this extension when tests are under a sub directory?

You can use VS Code command add folder to workspace to add the sub directory. The extension should work fine.

test.each is not working

Dynamic test name is not supported yet. This extension currently relies on the babel parser to calculate the positions of tests statically.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft