You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Carlos Santana <cs...@gmail.com> on 2014/08/22 17:31:56 UTC

getting tired of using mouse to open safari to inspect and magic path for livereload

I was going down the rabbit whole to see if there is a way I can launch the
safari debugger after doing a "cordova emulate ios", and maybe adding a cli
command "cordova inspect ios"

It's kind of annoying because every time you do a build/emulate the safari
window that is current debugging closes. and you have to again
"Develop->Inspect Simulator->index.html"

option 1: apple script to mimix what the mouse is doing with the menu
option 2: somehow call the webkit/safari debugger with the correct path
after figuring it out
(i.e. file:///Users/csantana23/Library/Application%20Support/iPhone%20Simulator/7.1/Applications/1A843146-C97F-457B-A832-4A6BA5FF9F19/HelloCordova.app/www/index.html)

Anyone know how to programmatically call from command line the webkit
debugger that makes it attached to the simulator?

I was able to open safari window with the path but it doesn't attached.


When I was looking the value  of document.location.href
I notice that
that 1A843146-C97F-457B-A832-4A6BA5FF9F19/HelloCordova.app/www/
is live content, I went ahead and updated some files (i.e. index.js,
logo.png) and did a document.location.reload() and it pickup the changes in
the simulator.

I know there is another way to do livereload by loading a url in
config.xml, but I think this could be another alternative because sometimes
you want to simulate or need local files and the url to be file:// for some
close testing to reality.

With some tooling and "magic" maybe we can do some livereload cli command.
Food for thought on that one :-)


-- 
Carlos Santana
<cs...@gmail.com>

Re: getting tired of using mouse to open safari to inspect and magic path for livereload

Posted by Carlos Santana <cs...@gmail.com>.
Thanks Ray I don't know how I missed your post [1] on GapDebug

GapDebug looks cool and clean, I have to give it a try and it mentions it's
free for local debug, I don't know what would be not remote, maybe over
wifi but I think that is totally a different use case, the local debug is
more of what I found more useful for developers.

It looks like GapDebug is not an open source project, I would like to see
also something in open source from apache or other org.

I heard some time ago about [2] ios-webkit-debug-proxy I will give it a
try, I think is minimal what I need to find out which is how to run the
webkit/safari debugger to attached to the simulator.

[1]:
http://www.raymondcamden.com/2014/7/2/GapDebug-a-new-mobile-debugging-tool
[2]: https://github.com/google/ios-webkit-debug-proxy



On Fri, Aug 22, 2014 at 11:44 AM, Ray Camden <ra...@adobe.com> wrote:

> Try GapDebug. It will try to reconnect on app relaunch. Plus, it lets you
> do the iOS stuff in Chrome, not Safari.
>
> ________________________________________
> From: Carlos Santana <cs...@gmail.com>
> Sent: Friday, August 22, 2014 10:31 AM
> To: dev@cordova.apache.org
> Subject: getting tired of using mouse to open safari to inspect and magic
> path for livereload
>
> I was going down the rabbit whole to see if there is a way I can launch the
> safari debugger after doing a "cordova emulate ios", and maybe adding a cli
> command "cordova inspect ios"
>



-- 
Carlos Santana
<cs...@gmail.com>

RE: getting tired of using mouse to open safari to inspect and magic path for livereload

Posted by Ray Camden <ra...@adobe.com>.
Try GapDebug. It will try to reconnect on app relaunch. Plus, it lets you do the iOS stuff in Chrome, not Safari.

________________________________________
From: Carlos Santana <cs...@gmail.com>
Sent: Friday, August 22, 2014 10:31 AM
To: dev@cordova.apache.org
Subject: getting tired of using mouse to open safari to inspect and magic path for livereload

I was going down the rabbit whole to see if there is a way I can launch the
safari debugger after doing a "cordova emulate ios", and maybe adding a cli
command "cordova inspect ios"