9

Ok, this is some question...well, I haven't seeing in any other place a question like this one...

I need to debug a javascript file through Eclipse (Helios)...but, that is not all, the javascript file is called by a third party application (C/C++) that runs (Mozilla) SpiderMonkey to execute the js file.

I need, someway to conect Eclipse to this application and get the debug symbols. Or, something like that...

Anyone see something like this before? Have an advice?

[EDITED]

Scenario:

The application (consoleApp.exe) runs the javascript engine SpiderMonkey embedded. I need to, from Eclipse IDE, attach the application process and debug the current javascript source that SM is running.

Tks!

[THANKS!!!]

For anyone who gives a thought/comment/idea to answer this question. I figured out what i have to do, but, it will be difficult. I need to ask to modify the application core to expose the debug information coming from SpiderMonkey and JSD. And write an Eclipse plugin (or modify Pistol, maybe) to
comply with i want to do. Again, thanks to everyone.

marcoaoteixeira
  • 505
  • 2
  • 14
  • Well using webstorm (intellij/idea based) I can debug node.js. So it should be possible. You need some debug version of spider monkey i think. Then you need to set up your debug run configuration in eclipse. Basically you call spidermonkey's debug version, then your js file. – Parris Feb 03 '13 at 01:56
  • [JSDT Debug](http://www.eclipse.org/webtools/jsdt/debug/)? – जलजनक Feb 03 '13 at 13:38
  • sorry...nope and nope... =/ – marcoaoteixeira Feb 13 '13 at 11:48

4 Answers4

4

You can try Firbug or Firefox web developer tools under Tools option.

In Eclipse:

JavaScript Development Tools (JSDT) - Eclipse.org

www.eclipse.org/webtools/jsdt/

SaK
  • 410
  • 3
  • 10
3

I am not very sure about this but you can have a look into this OR The Google Chrome Developer Tools for Java allow debugging using Chrome.

3

It looks like Piston does exactly what you are asking for in your original question, although you cannot use it to debug your executable directly as in your clarification. Unfortunately, it also looks like it is hard to set up.

ajh158
  • 1,477
  • 1
  • 13
  • 32
  • yes...i already looked at Piston...and, the real problem is, the application that i mentioned, is not emitting the debug symbols or breakpoint marks or whatever...(i get this information only on friday...very cool ... ¬_¬ )..so...there is no way to debug the javascript...i asked for the modifications at the application core to expose this informations, but my guess is that it will be just in the next year...anyway...thank you very much... – marcoaoteixeira Feb 13 '13 at 11:47
  • I'm not sure how complicated this application is, but another alternative would be to make a java version, perhaps with mock objects, that uses embedded Rhino, which I think is easier to set up for debugging. – ajh158 Feb 14 '13 at 13:26
0

Doesnt Eclipse have something similar to .Net's 'Attach to process' under debug options? That way, you can easily debug your client side using your firebug, and whenever a server script is executed, your eclipse will debug it as if it were executed from there.

Afroman Makgalemela
  • 690
  • 2
  • 8
  • 21
  • How does attach to process allow you to use firebug? I'd be interested in knowing how to do this and would vote it up if you post detailed instructions. – ajh158 Feb 08 '13 at 14:42
  • Yes, Eclipse can attach to a process for debug, but, if the main application does not exposes the debug informations - here i am talking about the interpreted javascript - there is not much you can do... =/ – marcoaoteixeira Feb 13 '13 at 11:38