Worker Typescript test debugging in VS Code
I have the most basic of cloudflare vitest test setups and want to be able to debug my tests in VS Code.
As per this CloudFlare doc on configuring vitest tests for workers in Typescript, https://developers.cloudflare.com/workers/testing/vitest-integration/get-started/write-your-first-test/ I have package.json, typescript / vitest configuration matching what's described in that doc. I have a single test which contains this reference to the
As per this CloudFlare doc on configuring vitest tests for workers in Typescript, https://developers.cloudflare.com/workers/testing/vitest-integration/get-started/write-your-first-test/ I have package.json, typescript / vitest configuration matching what's described in that doc. I have a single test which contains this reference to the
cloudflare:test
module
As per the documentation.
Now, when I run this test from the vitest cli, no problem. Test runs and works as expected.
However, when I then attempt to debug that test in VS Code, using the vitest-recommended debug config
https://vitest.dev/guide/debugging#vs-code
And I try to debug my test (and again, ONLY if the above "cloudflare:test"
module is referenced), the debugger barfs with
Anyone with better cloudflare/vitest/typescript/vs code debugging knowledge than I know why this would be the case?Vitest
Next generation testing framework powered by Vite
1 Reply
I have same problem, did you find any solution?