I am trying to debug a test file in docker that runs with node-tap. I have added the running command, configured the debugger to connect to docker. Everything works, the tests are run and the debugger connects, but it debugs the node-tap module instead of the test file.
I have the following command:
"dev:test": "NODE_ENV=test tap --debug --node-arg=--loader=ts-node/esm --node-arg=--no-warnings --node-arg=--experimental-specifier-resolution=node --node-arg=--inspect-brk=0.0.0.0:3034 tests/e2e/component.test.ts --timeout=1200 --jobs=1"
And here is the launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Docker",
"type": "node",
"request": "attach",
"port": 3034,
"address": "0.0.0.0",
"localRoot": "${workspaceFolder}",
"remoteRoot": "/app",
"restart": true,
"outFiles": ["${workspaceFolder}/build/**/*.js"],
"skipFiles": ["<node_internals>/**/*.js", "${workspaceFolder}/node_modules/**/*.js"]
}
]
}
When I run yarn dev:test, the debugger connects but I get sent to this:

Also when I add a breakpoint in my test file, it says: some of the brakpoints could not be set.
I found that adding the property program to the launch.json pointing to the file I want to run would solve the problem, but it says that the property is not allowed.
I also tried to point to different locations in localRoot and remoteRoot but it doesn't work also.
What can it be?
Found the problem.
Seems like the
outFilesinlaunch.jsonwas causing the problem. After removing it and letting it to take the default value it worked. (As I understand this is foryarn).It still starts the debugging in
tapmodule, but if I pressf5(the continue) it is stopping at the next breakpoint I set.