Skip to content

Instantly share code, notes, and snippets.

@rpetrich
Created March 13, 2012 15:33
Show Gist options
  • Save rpetrich/2029432 to your computer and use it in GitHub Desktop.
Save rpetrich/2029432 to your computer and use it in GitHub Desktop.
#!/bin/bash
MobileSafari_PID=$(ps x | grep "MobileSafari" | grep -v grep | awk '{ print $1 }')
if [ "$MobileSafari_PID" == "" ]; then
echo "Mobile Safari.app must be running in the Simulator to enable the remote inspector."
else
cat <<EOM | gdb -quiet > /dev/null
attach $MobileSafari_PID
p (void *)[WebView _enableRemoteInspector]
detach
EOM
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment