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 :
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 :
Where d.e.f is the IP of the server where Weinre is running.
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