Skip to content

Instantly share code, notes, and snippets.

@mjmaix
Created April 26, 2019 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mjmaix/78eff86bd891925fd00b4e4f10fb9a7b to your computer and use it in GitHub Desktop.
Save mjmaix/78eff86bd891925fd00b4e4f10fb9a7b to your computer and use it in GitHub Desktop.
React Native Debugger
{
"scripts": {
"debugger": "./scripts/run-debugger.sh",
"ios": "npm run debugger && react-native run-ios",
"android": "npm run debugger && react-native run-android",
}
}
PROCESS_NAME="React Native Debugger"
if [ -e "/Applications/React Native Debugger.app" ] > /dev/null; then
if pgrep $PROCESS_NAME; then
echo 'Debugger is already running';
else
echo 'Starting React Native Debugger';
open 'rndebugger://set-debugger-loc?host=localhost&port=8081';
fi
else
echo "React Native Debugger is not installed please run 'brew cask install react-native-debugger'";
fi;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment