JavaScript debugging in Eclipse

How to debug JavaScript in Eclipse. I am using Eclipse 3.2.1. Each time I click on the side, it gives you the ability to add bookmarks, but does not have a breakpoint.

Can someone help me with this?

+41
javascript debugging eclipse remote-debugging
Mar 04 '09 at 5:13
source share
9 answers

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

Adding to the above, here are a few videos that focus on "debugging JavaScript using eclipse"

Outdated

+29
Sep 02
source share

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

Use Firebug to debug Javascript code, this is a great add-on that all web developers should have in their toolbar.

+9
Mar 04 '09 at 5:19
source share

I'm not 100% sure, but I think Aptana will let you do this.

+9
Mar 04 '09 at 6:05
source share

I tried running aptana on my ubuntu 10.4. Unfortunately, I did not succeed. Chrome, on the other hand, has an eclipse plugin that allows you to debug javascript that runs on a chrome instance. It works very well. You will need to install the eclipse plugin, which you will find here:

http://code.google.com/p/chromedevtools/

Set breakpoints in javascript sources you are editing in eclipse and view the page in chrome. As soon as the javascript breakpoint is removed, the eclipse debugger stops and allows you to enter, navigate, view variables, etc. Very nice!

+5
Apr 21 '10 at 22:26
source share

JavaScript is executed in a browser that is fairly remote from Eclipse. To debug it, Eclipse would have to somehow connect to the browser JavaScript engine. Therefore, there is no built-in JavaScript debugging through Eclipse, since JS is not really its main focus.

However, there are plugins that you can install to debug JavaScript. I believe the core is the AJAX Toolkit Framework (ATF) . It injects Mozilla browser into Eclipse to debug it, so it will not be able to handle the cross-browser complications that usually occur when writing JavaScript, but this will certainly help.

+4
Mar 04 '09 at 5:21
source share

Use debugging tools supported by the browser. As mentioned above Firebug for Firefox Chrome Developer Tools from Chrome IE Developer for IE.

This way you can detect problems between browsers. To reduce cross browser issues, use the javascript framework, i.e. jQuery, YUI, moo tools, etc.

Below is a screenshot (javascript-debug.png) of what it looks like lime in Firebug.
1) hit 'F12'
2) go to the "Script" tab and "enable it" (if you are already on your page - press "F5" to reload)
3) next to the word "Everything", appears on the right. Select your javascript file from the drop-down list.
In the screenshot, I set a breakpoint on line 42 with the "left mouse button". This will allow you to tear, check, watch, etc.

enter image description here

+3
Jun 19 2018-11-18T00:
source share

You can debug JavaScript by setting breakpoints in Eclipse using the AJAX Tools Framework .

+3
Aug 15 '11 at 18:38
source share

MyEclipse (based on eclipse, requires a subscription) and Webclipse (the eclipse plug-in is currently free), from my Genuitec company, recently created (as of 2015) JavaScript debugging built-in:

enter image description here

You can debug both general web applications and Node.js files.

+2
Aug 26 '15 at 10:08
source share

For Node.js there is Nodeclipse 0.2 with some bug fixes for chromedevtools

+1
Mar 29 '13 at 10:12
source share



All Articles