6

According to the Vitest documentation, this is supposed to allow debugging of Vitest in visual Studio code. So I have the following in launch.json:

{
  "version": "0.2.0",
  "configurations": [
      {
          "type": "pwa-node",
          "request": "launch",
          "name": "Debug Current Test File",
          "autoAttachChildProcesses": true,
          "skipFiles": ["<node_internals>/**", "**/node_modules/**"],
          "program": "${workspaceRoot}/node_modules/vitest/vitest.mjs",
          "args": ["run", "${relativeFile}"],
          "smartStep": true,
          "console": "integratedTerminal"
      }
  ]
}

It runs in the debugger, but all breakpoints are "unbound" so is there any additional config that will let you stop on a breakpoint so that you actually CAN inspect code as it is running?

GeeWhizBang
  • 699
  • 4
  • 27
  • I think this issue could be similar to this one : https://stackoverflow.com/a/74858431/3990012 – serup Jan 23 '23 at 15:17

1 Answers1

0

in your vite.config.ts file add changes related to vitest: enter image description here

serup
  • 3,676
  • 2
  • 30
  • 34