Created
November 17, 2011 15:42
-
-
Save neonichu/1373458 to your computer and use it in GitHub Desktop.
Debug a MobileSafari instance running in the iOS 5 simulator
This file contains 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/sh | |
## | |
## Debug a MobileSafari instance running in the iOS 5 simulator | |
## | |
PID=`ps axc|awk '{if ($5=="MobileSafari") print $1}'` | |
if [ "$PID" == "" ] | |
then | |
echo "MobileSafari is not running." | |
exit 1 | |
fi | |
cat <<EOM | gdb -quiet > /dev/null | |
attach $PID | |
p (void *)[WebView _enableRemoteInspector] | |
detach | |
EOM | |
open 'http://localhost:9999' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment