[aerogear-dev] Debugging your Aerogear Application remotly with Weinre

Burr Sutter bsutter at redhat.com
Wed Jan 2 11:07:14 EST 2013


We can have more than 1 quickstart for Aerogear :-)

There should be one key/core archetype that shows up on JBoss Central - but there can be a dozen quickstarts to focus on different aspects of Aerogear capabilities.  

On Jan 2, 2013, at 11:01 AM, Sebastien Blanc wrote:

> Sure ! I will do  a blog post about Weinre and  on how to integrate it nicely.
> 
> 
> 
> On Wed, Jan 2, 2013 at 4:57 PM, Douglas Campos <qmx at qmx.me> wrote:
> 
> On 02/01/2013, at 12:15, Kris Borchers <kris at redhat.com> 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, especially non-JS devs. I would prefer to see this as a blog post/tutorial/article on AeroGear.org instead as the info is very valuable I just think it needs to 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 <scm.blanc at gmail.com> 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 Inspector (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 as a phone.
> >>
> >> So it's extremely useful and totally in the scope of Aerogear (Web/Hybrid)  which targets mobile development .
> >> It's easy to setup :
> >>
> >> 1. Install the Weinre server , if you have npm : sudo npm -g install weinre
> >> 2. Start the Weinre server : weinre --httPort 8081
> >> 3. Instrument your web page to act as a debug target by adding the following :
> >> <script src="http://a.b.c:8081/target/target-script-min.js"></script>
> >>
> >> 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 activate remote debugging by passing an parameter in the URL :
> >>
> >> http://a.b.c:8080/jboss-as-kitchensink-aerogear-js/index.html?debug=d.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 your 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 are a lot of requests :) ) if debugging is activated.
> >>
> >> If more people find this useful maybe we could merge it for the next release. comments welcome !
> >>
> >> Seb
> >>
> >> [1] http://people.apache.org/~pmuellr/weinre/docs/latest/)
> >> [2] https://github.com/sebastienblanc/as-quickstarts/tree/weinre/kitchensink-aerogear-js
> >> _______________________________________________
> >> aerogear-dev mailing list
> >> aerogear-dev at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/aerogear-dev
> >
> > _______________________________________________
> > aerogear-dev mailing list
> > aerogear-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/aerogear-dev
> 
> 
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
> 
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20130102/dc74586a/attachment.html 


More information about the aerogear-dev mailing list