Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Runs iOS 5 simulator with MobileSafari remote debug
# Open iPhone Simulator on default location for XCode 4.3
open /Applications/\
# Open mobile safari
echo Open mobile safari on emulator and press return
# Plug debug to
echo Debugging
MobileSafari_PID=$(ps x | grep "MobileSafari" | grep -v grep | awk '{ print $1 }')
if [ "$MobileSafari_PID" == "" ]; then
echo "Mobile must be running in the Simulator to enable the remote inspector."
cat <<EOM | gdb -quiet > /dev/null
attach $MobileSafari_PID
p (void *)[WebView _enableRemoteInspector]
# Open debugger in
open -a /Applications/ http://localhost:9999

This comment has been minimized.

Copy link

AndrewRayCode commented Oct 25, 2012

Undefined command: "83538". Try "help".

(that's the pid)


This comment has been minimized.

Copy link

canimus commented Dec 16, 2013

Unable to find Mach task port for process-id 78007: (os/kern) failure (0x5).
(please check gdb is codesigned - see taskgated(8))
A syntax error in expression, near `[WebView _enableRemoteInspector]'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.