<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">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 &nbsp;on the device is useful though and Weinre makes it much easier.<div><br></div><div>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 <a href="http://AeroGear.org">AeroGear.org</a> instead as the info is very valuable I just think it needs to be outside of the actual quickstart.</div><div><br></div><div>Any other thoughts from anyone?</div><div><br><div><div>On Jan 2, 2013, at 7:58 AM, Sebastien Blanc &lt;<a href="mailto:scm.blanc@gmail.com">scm.blanc@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi,<div><div style="">A few weeks ago, on the IRC channel there was a question about Weinre . For those who don't know what Weinre is (definition&nbsp;from Weinre's homepage) :</div><div style=""><br></div><div style="">
<span class="" style="color:rgb(0,136,136);font-style:italic;font-weight:bold;font-family:Menlo,Monaco,Consolas,'Lucida Console','dejavu sans mono',monospace;font-size:19px">weinre</span><span style="font-family: 'Times New Roman'; font-size: 19px; ">&nbsp;is a debugger for web pages, like FireBug (for FireFox) and Web Inspector (for WebKit-based browsers), except it's designed to work&nbsp;</span><b style="font-family: 'Times New Roman'; font-size: 19px; ">remotely</b><span style="font-family: 'Times New Roman'; font-size: 19px; ">, and in particular, to&nbsp;</span><b style="font-family: 'Times New Roman'; font-size: 19px; ">allow you debug web pages on a mobile device such as a phone</b><span style="font-family: 'Times New Roman'; font-size: 19px; ">.</span><br>
</div><div style=""><span style="font-family: 'Times New Roman'; font-size: 19px; "><br></span></div><div style="">So it's&nbsp;extremely&nbsp;useful and totally in the scope of Aerogear (Web/Hybrid) &nbsp;which targets mobile&nbsp;development&nbsp;.</div>
<div style="">It's easy to setup :</div><div style=""><br></div><div style="">1. Install the Weinre server , if you have npm :&nbsp;<span style="background-color: rgb(255, 255, 223); ">sudo npm -g install weinre&nbsp;</span></div>
<div style=""><font>2. Start the Weinre server : weinre --httPort 8081</font></div><div style=""><font>3. Instrument your web page to act as a debug target by adding the following :</font></div><div style="">
<font>&lt;script src="<a href="http://a.b.c:8081/target/target-script-min.js">http://a.b.c:8081/target/target-script-min.js</a>"&gt;&lt;/script&gt;</font></div><div style=""><font><br>
</font></div><div style=""><font>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 :&nbsp;</font></div>
<div style=""><font><br></font></div><div style=""><font><a href="http://a.b.c:8080/jboss-as-kitchensink-aerogear-js/index.html?debug=d.e.f:8081">http://a.b.c:8080/jboss-as-kitchensink-aerogear-js/index.html?debug=d.e.f:8081</a></font></div>
<div style=""><font><br></font></div><div style=""><font>Where d.e.f is the IP of the server where Weinre is running.</font></div><div style=""><font><br></font></div><div style=""><font>Then you can access the debug page : <a href="http://localhost:8081/client">http://localhost:8081/client</a>&nbsp;</font></div>
<div style=""><font><br></font></div><div style=""><font>The little tweak I made give more flexibility on how you can integrate your app with Weinre :</font></div><div style=""><font>- No hardcoding in your script.</font></div>
<div style=""><font>- You can easily change the IP of the debug server</font></div><div style=""><font>- The client makes only make requests to the debug servers (and there are a lot of requests :) ) if debugging is activated.</font></div>
<div style=""><font><br></font></div><div style=""><font>If more people find this useful maybe we could merge it for the next release. comments welcome !</font></div><div style=""><font><br>
</font></div><div style=""><font>Seb</font></div><div style=""><font><br></font></div><div style=""><font>[1]&nbsp;</font><a href="http://people.apache.org/~pmuellr/weinre/docs/latest/">http://people.apache.org/~pmuellr/weinre/docs/latest/</a>)</div>
<div style="">[2]&nbsp;<a href="https://github.com/sebastienblanc/as-quickstarts/tree/weinre/kitchensink-aerogear-js">https://github.com/sebastienblanc/as-quickstarts/tree/weinre/kitchensink-aerogear-js</a></div></div></div>
_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/aerogear-dev<br></blockquote></div><br></div></body></html>