vscode-jest-runner
vscode-jest-runner copied to clipboard
Bug with debug autoAttachFilter in dev containers
Hi @firsttris , First thanks for this awesome extension. ❤️
I have a devContainer setup with "debug.javascript.autoAttachFilter": "smart" setting. Previously I was able to run all of my tests using your plugin but after adding this setting I'm getting this error:
node 'node_modules/.bin/jest' '/workspace/apps/...src/main.service.spec.ts' -t 'MainService'
node:internal/modules/cjs/loader:1251
throw err;
^
Error: Cannot find module '/home/node/.vscode-server/data/User/workspaceStorage/5ff47cd083827e523237aeb1fab23b76/ms-vscode.js-debug/bootloader.js'
Require stack:
- internal/preload
at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
at Module._load (node:internal/modules/cjs/loader:1074:27)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
at Module.require (node:internal/modules/cjs/loader:1339:12)
at Module._preloadModules (node:internal/modules/cjs/loader:1826:12)
at loadPreloadModules (node:internal/process/pre_execution:730:5)
at setupUserModules (node:internal/process/pre_execution:205:5)
at prepareExecution (node:internal/process/pre_execution:158:5)
at prepareMainThreadExecution (node:internal/process/pre_execution:53:10) {
code: 'MODULE_NOT_FOUND',
requireStack: [ 'internal/preload' ]
}
Node.js v22.9.0
A workaround is to "Toggle Auto Attach" to disabled and then back to enabled/smart.
BTW, I have no issue when I'm running my tests using vscode-jest extension (even without the workaround above)
Maybe related to this: https://github.com/microsoft/vscode-remote-release/issues/5516
Maybe related: https://github.com/firsttris/vscode-jest-runner/pull/335