Sunday, September 30, 2012

Debuging javascript - some muses

One can use eclipse Helios/Indigo. Which comes with a javascript script debuging support JSDT. JSDT comes with a inbuilt javascript engine known as Rhino .

Rhino could be used for running/debugging script which are not associated with browser DOM. Thus stand alone scripts could be writen tested and degugged using JSDT and built in Rhino script engine.

Attaching other script engines is not known to me. And i am in prowl of it.

But majority of work relating to mine is depending on browser side scripting like developing web application.

Currently this is handled majoritively using :

  • Firebug
  • Mozilla firefox developer tools
  • Chrome developer tools

One disadvantage of such approah is that these tools are not intergrated tom y IDE which is eclipse. As any java influenced devloper would expect a full fledged IDE with source editing and debugging capability.

So what are the new rumblings towards this direction. i came by this slide which gives an overview of improvements in this direction. Having used remote debuggin for debugging cloud based applications  as in GAE i know how it could ease my job to a certain level. A little reading bought me to this conclusion that in near future almost all browser/mobile browser woul be equiped with remote debugging where an Eclipse IDE could be used for debugging the browser dom based scripts. Lively changing the code making javascript development much easier.

Chrome is seen to be more progressing in this  with their chromedevtools . One could get a plugin of this from eclipse update site . On how to debug browser remotlty from eclipse using chromedevtools refer - http://chromedevtools.googlecode.com/svn/wiki/DebuggerTutorial.wiki  .    Chrome also have a new version of this which is an experimental one which allows remote debugging of webkit based engines. this is surely going to benefit a lot of developers who develop for mobile abd tablets.

Apart from chrome Firebug the major cross browser developer tool provide a experimental version of remote debugging under the name crossfire  . Crossfire again is an eclipse plugin with intergration with jsdt which allows you put breakpoints in eclipse web porject javascript source code and the firebug handles the breakpoint correspondingly.

And the last one in this race is mozilla remote debugging protocol. As this is in spec mode at the time of writing this article SO no implementations where found. THis is acceptable due to the fact that mozilla was the last to enter the browser debugging capability after chrome firebug.

.

No comments: