-
A minimal reproduction is as follows: # Pull an official basic example from the vitest repo.
git clone --depth=1 https://github.com/vitest-dev/vitest.git
cd vitest/examples/basic
# Update to latest vite & vitest.
npm i -D vite@latest vitest@latest
# Create a test.
cat > test/issue.test.ts <<'EOS'
import { test } from 'vitest'
test("it", () => {
console.log("foo")
})
EOS
# Open the project as a VSCode workspace
code . Then,
Now the debugger pauses: However, the editor does not jump to the source. Instead, a transformed code comes up. I can see an inline sourcemap at the end of the transformed code. But it does not seem to be utilized. Any ideas? Environment
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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. |
Beta Was this translation helpful? Give feedback.
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.
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.