-
Notifications
You must be signed in to change notification settings - Fork 38.4k
Closed
GarfieldZHU/vscode
#2Labels
feature-requestRequest for new features or functionalityRequest for new features or functionality
Description
I'm trying to attach the Visual Studio Code debugger to a node.js app that is running inside a Docker container.
The app starts like:
node --debug-brk app.jsMy docker-compose.yml exposes the port for attaching:
app:
build: .
working_dir: /code
volumes:
- .:/code
command: npm run debug
ports:
- "3004:3000"
- "5858:5858"launch.json is pretty simple:
{
"version": "0.2.0",
"configurations": [
{
"name": "Docker",
"type": "node",
"request": "attach",
"port": 5858
}
]
}Now, when I start the application and attach the debugger this will correctly connect (I can see the values flashing in the debugger UI already), but then it will stop, telling me the following:
Error opening 'app.js' (File not found: /code/app.js).
Is there any way to fix this path offset? Should one handle this scenario completely different?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionality