Unable to debug TestCafe browser running in a docker container Unable to debug TestCafe browser running in a docker container docker docker

Unable to debug TestCafe browser running in a docker container


It seems, node inspection doesn't work well with the host network for some reason. Try to remove the --net=host option and add the -p 127.0.0.1:9229:9229 one. A contained node process should then appear in DevTools (at chrome://inspect) under the 'Remote Target #LOCALHOST' section.

Also, you need to remove the -e NODE_OPTIONS="--inspect-brk=0.0.0.0:9229" option and add the --inspect-brk=0.0.0.0:9229 flag after testcafe/testcafe to avoid the 'Starting inspector on 0.0.0.0:9229 failed: address already in use' error.


When you see the Debugger listening on ws://0.0.0.0:9229/66cce714-31f4-45be-aed2-c50411d18319 message (or similar), navigate to the http://localhost:9229/json URL in your browser and find the devtoolsFrontendURL:

enter image description here

Copy and paste it to your browser to start your debugging session:

enter image description here