Skip to content

Instantly share code, notes, and snippets.

@stigi
Created December 7, 2011 11:42
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 stigi/947051463dfb8055a9d8 to your computer and use it in GitHub Desktop.
Save stigi/947051463dfb8055a9d8 to your computer and use it in GitHub Desktop.
#!/bin/sh
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 2>/dev/null
attach $MobileSafari_PID
p (void *)[WebView _enableRemoteInspector]
detach
EOM
open http://localhost:9999
fi
@stigi
Copy link
Author

stigi commented Dec 7, 2011

don't forget to chmod +x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment