docker-debug
v0.0.3
Published
This library creates a simple command (`dbug`) for running the docker script
Downloads
7
Readme
node-docker-debug
This library creates a simple command (dbug
) for running the docker script
docker-compose up --build && docker-compose down
This script performs 2 extra steps to support easier node debugging:
- It injects the runtime-calculated host IP address as an environment variable (
HOST_IP
)
HOST_IP=$(ifconfig | awk '/broadcast/ { print $2 }')
- It watches stdout for a node --inspect chrome-devtools url and opens a new Chrome tab for debugging
setup
- Your docker container should run node with the
--inspect
flag - Your docker container should expose the node inspect port
port
If you have customized your node inspect port to be different from the default (9229), you may pass it to dbug as either an environment variable
PORT=9220 dbug
or as the first paramter
dbug 9220