Node js docker remote debugging chrome

I am running a node js server within Docker and I would like to be able to connect chrome dev tools on my host to node js on docker for debugging purpsoses.

This seems to be possible as I followed the post here : Why Chrome can’t inspect nodejs code in Docker container?

In fact by binding the ports 9229:9229 on the host and within docker to each other and in docker running the command when I start the node js

node --inspect-brk=[0.0.0.0] app

I am able to connect chrome dev tools to node js, however none of my break points work – I can only see the console logs within chrome.

How can I get my breakpoints to work? What am I missing here?

Chrome fails to serve from debugging port inside docker container

I have a very simple docker container that installs ‘google-chrome-stable’ by following these instructions.

Inside the container, I can’t start and access the debug server:

# start chrome in debug mode
$ google-chrome-stable --no-sandbox --remote-debugging-port=9222

# verify that I can reach the debugging server
$ curl 127.0.0.1:7222
curl: (7) Failed to connect to localhost port 7222: Connection refused

Outside the container (OSX 10.12.6), the same process works fine:

# start chrome in debug mode
$ chrome --no-sandbox --remote-debugging-port=9222

# verify that I can reach the debugging server
$ curl localhost:9222
curl localhost:9222


Inspectable pages
...

There must be something I’m missing because it seems like these are identical workflows even though the environments are different.

Can someone illuminate what’s going on here?