Skip to content

Cannot step-debug on original source (inline sourcemap does not work) #74

Answered by kaorukobo
kaorukobo asked this question in Q&A
Discussion options

You must be logged in to vote

I was able to answer my own question. I tried the minimal reproduction again with making it cleaner, dropping the use of the official vitest example.

# Create a project.
mkdir tmp
cd tmp
pnpm i -D vite@3.1.2 vitest@0.23.4

# Create a test.
cat > sample.test.ts <<'EOS'
import { test } from 'vitest'

test("it", () => {
  console.log("foo")
})
EOS

# Open the example as a VSCode workspace with vitest extension 0.2.29
code .

Then placing a breakpoint, executing "Debug Test", and it worked as I expected:

I suspect that the cause was the use of the official vitest example though I cannot find the reason.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kaorukobo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant