Hi!
since the last update to 1.47.0 at the 11.7.2020, attaching debuggers to multiple docker containers stopped working:
We attach to multiple docker containers by:
{
"type": "node",
"request": "attach",
"name": "Attach[MICROSERVICENAME]",
"port": MICROSERVICEPORT,
"restart": true,
"address": "localhost",
"localRoot": "${workspaceFolder}/MICROSERVICENAME",
"protocol": "inspector",
"remoteRoot": "/usr/src/app"
}
Without setting any breakpoints, everything works fine. If I add a breakpoint somewhere in the code, the debugger stops at "random" positions in the code. These positions are always the same, depending on the breakpoint, but in completely different files.
Also adding a breakpoint in microservice2 in debugmode, without attaching to it causes the debugger of microservice1 to stop at non existing breakpoints.
VS Code Version: 1.47.1 (1.48.0 has the same error)
vscode-debugadapter-microservice1.gz
vscode-debugadapter-microservice2.json.gz
EDIT Downgraded vscode to version 1.46.1 and everything works fine again
Can confirm this error with just one docker container. Current Setup is:
node --version
v12.16.3
docker --version
Docker version 19.03.8, build afacb8b7f0
md5-39bf59e8e79d11ea81c962fb1629944a
vscode:
1.48.0-insider
I connect just one container and if one breakpoint is set there are random breakpoints all over the place. After I set and reset the breakpoint I get to a specific point in my code but not where I set it.
Thanks, looking at this. You can set debug.javascript.usePreview: false to skip using the new debugger on the latest VS Code version.
It looks like this happens when your file is outside of the localRoot folder. In this case the breakpoint was in /home/ubuntu/Development/manager/market/src/http/mode.js where the localRoot was /home/ubuntu/Development/manager/core.
I copied the path-remapping behavior from the old debugger, but I think we use it in a different way that's improper. I'll have a fix in today's nightly build published at 5 PM PST.
Thanks!