docker-debug

0.0.3 • Public • Published

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:

  1. It injects the runtime-calculated host IP address as an environment variable (HOST_IP)
HOST_IP=$(ifconfig | awk '/broadcast/ { print $2 }')
  1. It watches stdout for a node --inspect chrome-devtools url and opens a new Chrome tab for debugging

setup

  1. Your docker container should run node with the --inspect flag
  2. 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

Readme

Keywords

none

Package Sidebar

Install

npm i docker-debug

Weekly Downloads

4

Version

0.0.3

License

ISC

Last publish

Collaborators

  • robb.traister