{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/docker-node/issues/589","repository_url":"https://api.github.com/repos/nodejs/docker-node","labels_url":"https://api.github.com/repos/nodejs/docker-node/issues/589/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/docker-node/issues/589/comments","events_url":"https://api.github.com/repos/nodejs/docker-node/issues/589/events","html_url":"https://github.com/nodejs/docker-node/issues/589","id":275399944,"node_id":"MDU6SXNzdWUyNzUzOTk5NDQ=","number":589,"title":"Cannot attach debugger to Docker Node 8.9.x","user":{"login":"tpuza","id":11077676,"node_id":"MDQ6VXNlcjExMDc3Njc2","avatar_url":"https://avatars1.githubusercontent.com/u/11077676?v=4","gravatar_id":"","url":"https://api.github.com/users/tpuza","html_url":"https://github.com/tpuza","followers_url":"https://api.github.com/users/tpuza/followers","following_url":"https://api.github.com/users/tpuza/following{/other_user}","gists_url":"https://api.github.com/users/tpuza/gists{/gist_id}","starred_url":"https://api.github.com/users/tpuza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpuza/subscriptions","organizations_url":"https://api.github.com/users/tpuza/orgs","repos_url":"https://api.github.com/users/tpuza/repos","events_url":"https://api.github.com/users/tpuza/events{/privacy}","received_events_url":"https://api.github.com/users/tpuza/received_events","type":"User","site_admin":false},"labels":[{"id":156909101,"node_id":"MDU6TGFiZWwxNTY5MDkxMDE=","url":"https://api.github.com/repos/nodejs/docker-node/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-11-20T15:42:57Z","updated_at":"2018-07-26T07:53:16Z","closed_at":"2017-11-20T21:52:16Z","author_association":"NONE","body":"We run and debug NodeJS apps at Docker containers (6.12.0) using VSCode or Chrome DevTools (chrome://inspect) without any problems.\r\n\r\nAttaching debugger to NodeJS containers based on new LTS version 8.9.x stoped to work (debugger attach timeouts). Both VSCode and Chrome DevTools attach behave the same.\r\n\r\nSame behavior is reproducible on both Windows 10 an MacOS (High Siera), latest Docker installation.\r\n\r\nDockerfile looks like this\r\n\r\n```\r\nFROM node:8.9.1-slim\r\nENV PORT=8080\r\n\r\nRUN mkdir /usr/src/app\r\nWORKDIR /usr/src/app\r\nCOPY ./ /usr/src/app\r\n\r\nRUN npm i\r\n\r\nCMD [\"node\", \"--inspect\", \"bin/www\"]\r\n```\r\nCommand used to run container (exposing debugging 9229 and web server 8080 ports)\r\n\r\n`docker run --rm -p 9229:9229 -p 8080:8080 --name docker_debug docker_debug`\r\nDemo app is simple NodeJS express app bootstraped using express-generator tool.\r\n\r\nVSCode Launch configuration to attach running Docker app looks like this\r\n\r\n```\r\n{\r\n  \"version\": \"0.2.0\",\r\n  \"configurations\": [\r\n    {\r\n      \"name\": \"Docker: Attach to Node\",\r\n      \"type\": \"node\",\r\n      \"request\": \"attach\",\r\n      \"port\": 9229,\r\n      \"address\": \"localhost\",\r\n      \"localRoot\": \"${workspaceFolder}\",\r\n      \"remoteRoot\": \"/usr/src/app\",\r\n      \"protocol\": \"inspector\"\r\n    }\r\n  ]\r\n}\r\n```\r\nAs mentioned, debugger attach works without any problems when switching base image to former Node LTS version 6.12.0.\r\n\r\n`FROM node:6.10.0-slim`\r\n\r\nI have tested 8.9.0, 8.9.1, slim and alpine base images with same result."},"comment":{"url":"https://api.github.com/repos/nodejs/docker-node/issues/comments/408009728","html_url":"https://github.com/nodejs/docker-node/issues/589#issuecomment-408009728","issue_url":"https://api.github.com/repos/nodejs/docker-node/issues/589","id":408009728,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODAwOTcyOA==","user":{"login":"SimenB","id":1404810,"node_id":"MDQ6VXNlcjE0MDQ4MTA=","avatar_url":"https://avatars1.githubusercontent.com/u/1404810?v=4","gravatar_id":"","url":"https://api.github.com/users/SimenB","html_url":"https://github.com/SimenB","followers_url":"https://api.github.com/users/SimenB/followers","following_url":"https://api.github.com/users/SimenB/following{/other_user}","gists_url":"https://api.github.com/users/SimenB/gists{/gist_id}","starred_url":"https://api.github.com/users/SimenB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimenB/subscriptions","organizations_url":"https://api.github.com/users/SimenB/orgs","repos_url":"https://api.github.com/users/SimenB/repos","events_url":"https://api.github.com/users/SimenB/events{/privacy}","received_events_url":"https://api.github.com/users/SimenB/received_events","type":"User","site_admin":false},"created_at":"2018-07-26T07:53:16Z","updated_at":"2018-07-26T07:53:16Z","author_association":"MEMBER","body":"PR most welcome! :)"}}
{"actor":{"display_login":"SimenB"}}