0

Does anyone know how to get code-assist working while debugging (say for instance while forming a watch expression) Node.js in Eclipse?

One of the motivations for my wanting to use Node.js on the server side was the idea that I could debug applications just as easily as I can debug client-side javascript code in a browser console like the one Chrome includes.

This seems like it should be a pretty easy one.

Thanks in advance.

Code True
  • 636
  • 7
  • 18
  • 1
    Have a look at [node-inspector](https://github.com/node-inspector/node-inspector). You can use the exact same Chrome debugging tools. – PeterVC Nov 07 '14 at 21:02
  • @PeterVC, node-inspector seems to do everything I want with one rather big caveat, the debugger doesn't seem to have access to variables in the local scope. E.g. when stopped at a breakpoint, typing the name of a local variable (say 'someVar') into the browsers console results in a "ReferenceError: someVar is not defined" – Code True Nov 10 '14 at 21:32
  • That's odd. I can see the variables listed under 'Local' in the 'Scope Variables' tab and have complete access to them in the console. – PeterVC Nov 10 '14 at 22:02
  • I must have some configuration issues then... thnx for the info. – Code True Nov 11 '14 at 18:23
  • Ah... it seems that IE being default browser somehow was preventing the debugger from working entirely. Switched default to Chrome now everything works great. Thank you Peter. – Code True Nov 11 '14 at 18:54

1 Answers1

0

For better Node.js debugging in Eclipse there is Nodeclipse project http://www.nodeclipse.org/updates/

It comes with Tern that gives mouse over hints

Paul Verest
  • 60,022
  • 51
  • 208
  • 332