From qmx at qmx.me Wed Jan 2 10:58:03 2013 Content-Type: multipart/mixed; boundary="===============5800624614465955175==" MIME-Version: 1.0 From: Douglas Campos To: aerogear-dev at lists.jboss.org Subject: Re: [aerogear-dev] Debugging your Aerogear Application remotly with Weinre Date: Wed, 02 Jan 2013 13:57:56 -0200 Message-ID: In-Reply-To: AD136453-CA04-45AE-A2D0-F776C8503670@redhat.com --===============5800624614465955175== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 02/01/2013, at 12:15, Kris Borchers wrote: > Weinre is an amazing tool. I would say it is much more useful for hybrid = apps as opposed to web apps since, for the most part, you can just run your= web app in a desktop browser to debug it. There are definitely cases where= testing on the device is useful though and Weinre makes it much easier. +1 > = > I would prefer to not add this to the quickstart. I think the extra code = will mostly just get in the way of someone trying to grok the JS, especiall= y non-JS devs. I would prefer to see this as a blog post/tutorial/article o= n AeroGear.org instead as the info is very valuable I just think it needs t= o be outside of the actual quickstart. Indeed, a blog post on weinre would be rad - wanna give it a run sebi? +1 > = > Any other thoughts from anyone? > = > On Jan 2, 2013, at 7:58 AM, Sebastien Blanc wrote: > = >> Hi, >> A few weeks ago, on the IRC channel there was a question about Weinre . = For those who don't know what Weinre is (definition from Weinre's homepage)= : >> = >> weinre is a debugger for web pages, like FireBug (for FireFox) and Web I= nspector (for WebKit-based browsers), except it's designed to work remotely= , and in particular, to allow you debug web pages on a mobile device such a= s a phone. >> = >> So it's extremely useful and totally in the scope of Aerogear (Web/Hybri= d) which targets mobile development . >> It's easy to setup : >> = >> 1. Install the Weinre server , if you have npm : sudo npm -g install wei= nre = >> 2. Start the Weinre server : weinre --httPort 8081 >> 3. Instrument your web page to act as a debug target by adding the follo= wing : >> >> = >> To make things even easier, I've created a new branch on the kitchensink= app where step 3 is not needed anymore[1]. Instead of this you can just ac= tivate remote debugging by passing an parameter in the URL : = >> = >> http://a.b.c:8080/jboss-as-kitchensink-aerogear-js/index.html?debug=3Dd.= e.f:8081 >> = >> Where d.e.f is the IP of the server where Weinre is running. >> = >> Then you can access the debug page : http://localhost:8081/client = >> = >> The little tweak I made give more flexibility on how you can integrate y= our app with Weinre : >> - No hardcoding in your script. >> - You can easily change the IP of the debug server >> - The client makes only make requests to the debug servers (and there ar= e a lot of requests :) ) if debugging is activated. >> = >> If more people find this useful maybe we could merge it for the next rel= ease. comments welcome ! >> = >> Seb >> = >> [1] http://people.apache.org/~pmuellr/weinre/docs/latest/) >> [2] https://github.com/sebastienblanc/as-quickstarts/tree/weinre/kitchen= sink-aerogear-js >> _______________________________________________ >> aerogear-dev mailing list >> aerogear-dev(a)lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/aerogear-dev > = > _______________________________________________ > aerogear-dev mailing list > aerogear-dev(a)lists.jboss.org > https://lists.jboss.org/mailman/listinfo/aerogear-dev --===============5800624614465955175==--