Skip to content

Instantly share code, notes, and snippets.

@matthewp
Created July 16, 2013 14:15
Show Gist options
  • Save matthewp/6009106 to your computer and use it in GitHub Desktop.
Save matthewp/6009106 to your computer and use it in GitHub Desktop.
Simple script for launching node-inspector and node --debug in one. Kills the inspector when you ctrl+c
#!/bin/bash
INSP_PID=0
function ctrl_c() {
echo "Killing process" $INSP_PID
kill $INSP_PID
exit 0
}
trap ctrl_c INT
node-inspector --web-port=8989 &
INSP_PID=$!
node --debug-brk "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment