Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Breakpoints in Javascript
Breakpoints in Javascript [message #219468] Wed, 20 August 2008 17:11 Go to next message
Eclipse UserFriend
Originally posted by: david.mcneill.ge.com

Hi,

I posted a similar message a few days ago, but it seems to have
disappeared, so I apologize if you've seen this before.

We have an existing Java project created in Eclipse 3.1. We recently added
some third-party javascript libraries to the project, for use in our JSPs.
We need to be able to debug these libraries, to allow us to customize them
and to fix some bugs we've run into.

I've downloaded Ganymede EE version, and it loads my existing workspace
without any problems. The interface is awesome, but I can't set a
breakpoint in the javascript code. When I try, it just offers me the
chance to create a bookmark. That would be useful, too, but it's not what
I need most. Inserting a debugger; statement didn't have any effect,
either.

The introductory tutorial by Bradley Childs that I saw said debugging
worked the same as in java, but it doesn't on my machine. Has anyone been
able to get this to work?

Suggestions, alternatives, and workarounds also welcome.

thanks,
Dave M
Re: Breakpoints in Javascript [message #219494 is a reply to message #219468] Wed, 20 August 2008 22:27 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 355
Registered: July 2009
Senior Member
You can't debug JavaScript with normal Eclipse. Your best bet would
simply be to load Firebug on FireFox and debug with that. You could also
get the Aptana plugin. The free version integrates with Firebug on
FireFox, and the commercial version allows similar debugging on IE. What
I don't like about Aptana is that it also overrides the XML editor, which
actually seems less functional than the default XML editor. You can
change the editor associations after installation, it's just a pain.
Re: Breakpoints in Javascript [message #219541 is a reply to message #219494] Thu, 21 August 2008 22:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: david.mcneill.ge.com

Thanks for the reply. I've seen other people mention Firebug, but I didn't
know there was a version for IE. (Our company standard is still IE6).

I'm not sure what "normal eclipse" means. I have the latest release, with
the Javascript Developer Toolkit built into it. It seems odd that I can't
use it.
Re: Breakpoints in Javascript [message #219549 is a reply to message #219541] Thu, 21 August 2008 23:41 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 355
Registered: July 2009
Senior Member
The full Firebug plugin only works in FireFox, but there is a "FireBug
Lite" which works in IE, but I don't know if you can set breakpoints in
that. There is also at least two different tools available from Microsoft
that enable JavaScript debugging, but I'm not familiar with them.
Re: Breakpoints in Javascript [message #219781 is a reply to message #219541] Fri, 29 August 2008 10:54 Go to previous message
Bartosz Leper is currently offline Bartosz LeperFriend
Messages: 4
Registered: July 2009
Junior Member
Hi Dave,

Dave M wrote:
> Thanks for the reply. I've seen other people mention Firebug, but I didn't
> know there was a version for IE. (Our company standard is still IE6).

If it's IE, the best thing you can do is to download a free version of
Visual Studio (it's called Visual Web Developer Express, or sth like
that). The free version theoretically allows you to debug scripts only on
IIS-based applications, but there's a hack around this: set up a new
project, and run it in a browser. Then, when IE pops up, just point to
your service. :)

Let me know if it helps you.

Oh, and BTW, you still have to remember about one ugly bug that MS have in
its JS interpreter: you can't set a breakpoint on a first line of any
anonymous function. So you'll have to fiddle with the code temporarily.
You can't override it with any debugger, it's the JS core that is messed
up, unfortunately. :/

Greets,
Bartek Leper
Previous Topic:Removing Node from StructuredTextEditor
Next Topic:Injecting additional stylesheets into an IDOMDocument
Goto Forum:
  


Current Time: Mon Dec 22 07:55:36 GMT 2014

Powered by FUDForum. Page generated in 0.09828 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software