Hello. We are observing some strange behavior when running our Theia app in a Docker container on a specific Linux Docker host only. Therefore, I would like to debug the Theia Node backend remotely, but I am stuck already getting it to work locally on my Mac. Anybody has any experience and tips? Do I have to do something with the hostname?
Here is what I did:
-
I built a special version of a Theia Docker image that keeps all the source code (which allows me to debug the browser code as well)
-
I start Theia with this command:
docker run -it -p 3000:3000 --expose 9229 -p 9229:9229 06cea55c9115 --log-level=debug --inspect=0.0.0.0:9229
-
In the Theia terminal I can see with ps that node is running like this then:
node /home/wazi/src-gen/backend/main.js /home/project --hostname=0.0.0.0 --log-level=debug --inspect=0.0.0.0:9229
-
On my Mac I created a VS Code launch like this:
"name": "Attach to Docker Theia Backend",
"type": "node",
"request": "attach",
"port": 9229,
"address": "127.0.0.1",
"localRoot": "${workspaceFolder}",
"remoteRoot": "/home/wazi/src-gen/backend/main.js",
"protocol": "inspector"
}
- When I try to launch this I just get timeouts
Thanks in advance for any tips,
Peter.
[original thread by Peter Haumer]