-
-
Save buritica/2241976 to your computer and use it in GitHub Desktop.
#!/bin/bash | |
# Open iPhone Simulator on default location for XCode 4.3 if found | |
[[ -d /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] && | |
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app | |
# Open iPhone Simulator on default location for XCode 4.2 if found | |
[[ -d /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] && | |
open /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app | |
# Open mobile safari | |
echo Open mobile safari on emulator and press return | |
read | |
# Plug debug to MobileSafari.app | |
echo Debugging | |
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." | |
exit | |
else | |
cat <<EOM | gdb -quiet > /dev/null | |
attach $MobileSafari_PID | |
p (void *)[WebView _enableRemoteInspector] | |
detach | |
EOM | |
fi | |
# Open debugger in Safari.app | |
open -a /Applications/Safari.app http://localhost:9999 |
Can't wait for XCode to download so I can try this, would there be anything wrong with running it straight from gist via:
curl -s https://raw.github.com/gist/2241976/c61972c13f2a99f0e80bbf83aa98b117c2224c25/iosd | bash
Is this still working with XCode 4.4?
Can start the Simulator, connect the debugger but I'm getting just an empty Page. And an "Error during WebSocket handshake: 'Sec-WebSocket-Accept' header is missing".
i get an empty page with xcode 4.3, safari 6.
on chrome 21 i see the same error "Error during WebSocket handshake: 'Sec-WebSocket-Accept' header is missing". in safari i see no errors, but it looks like actually the same thing is happening.
i suspect the safari 6 upgrade has caused the problem given this was previously working for me.
@novocaine I get the same error
Same error here as reported by novocaine and chaffeqa.
You need to use an earlier version of webkit that supports an earlier version of websockets. See http://www.iwebinspector.com/help.html#ml
my path:
/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator
hmm
Unable to find Mach task port for process-id 55962: (os/kern) failure (0x5).
(please check gdb is codesigned - see taskgated(8))
A syntax error in expression, near `[WebView _enableRemoteInspector]'.
gdb installed with brew
Download this file to your ~/Downloads folder, extract the tar, move
iosd
to your Downloads folder, then run the following from a Terminal window: