How can I debug JavaScript in Eclipse. I am using Eclipse 3.2.1. Everytime I click on the side it gives the option for adding bookmark but no break point.

Could anyone assist me on this?


Solution 1:

In 2015, there are at least six choices for JavaScript debugging in Eclipse:

  • New since Eclipse 3.7: JavaScript Development Tools debugging support. The incubation part lists CrossFire support. That means, one can use Firefox + Firebug as page viewer without any Java code changes.
  • New since October 2012: VJET JavaScript IDE
  • Ajax Tools Framework
  • Aptana provides JavaScript debugging capabilities.
  • The commercial MyEclipse IDE also has JavaScript debugging support
  • From the same stable as MyEclipse, the Webclipse plug-in has the same JavaScript debugging technology.

Adding to the above, here are a couple of videos which focus on "debugging JavaScript using eclipse"

  • Debugging JavaScript using Eclipse and Chrome Tools
  • Debugging JavaScript using Eclipse and CrossFire (with FB)

Outdated

  • The Google Chrome Developer Tools for Java allow debugging using Chrome.

Solution 2:

I don't believe Eclipse has a JavaScript debugger - those breakpoints are for Java code (I'm guessing you are editing a JSP file?)

Use Firebug to debug Javascript code, it's an excellent add-on that all web developers should have in their toolbox.

Solution 3:

I'm not a 100% sure but I think Aptana let's you do that.