Created
July 16, 2013 14:15
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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