Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging Node.js with Eclipse

I am trying to debug Node.js (v0.6.1) with Google's Eclipse debugger plugin for V8. I'm using Eclipse v4.1.0 on Windows7. I followed the Using Eclipse as Node Applications Debugger, but whenever I try to attach to a running Node.js (port 5858) process, I get a pop-up error message saying:

An internal error occurred during: "Debug session initialization: Node-5858".
Exception occured in callback

Any suggestions ?

like image 856
user1053334 Avatar asked Nov 18 '11 07:11

user1053334


People also ask

How do I debug Node JS in eclipse?

Debugging and breakpointsSelect the main source file of the Node Application in the Project Explorer or anywhere inside Editor, open the context menu with right-click, select the Debug As -> Node Application .

Can I use Eclipse for Node JS?

js IDE (based on Nodeclipse 0.17) Eclipse Node. JS IDE (Enide) is basically one configuration file (*. p2f) that lets you quick start with Node. js development.

Can we debug js in eclipse?

With the Webclipse debugger, you can debug generic web applications (JavaScript, TypeScript, (X)HTML, and JSP files), including web fragments and Node. js applications without leaving Eclipse. The first time the debugger encounters a breakpoint, you are asked to switch to the Debug perspective.

How do I debug Node JS?

To use it, start Node. js with the inspect argument followed by the path to the script to debug. The debugger automatically breaks on the first executable line. To instead run until the first breakpoint (specified by a debugger statement), set the NODE_INSPECT_RESUME_ON_START environment variable to 1 .


1 Answers

I have been looking into a problem similar to this, this is what I have found

The instructions for setting it up, might just be worth re-reading these to make sure everything is as it should be:

https://github.com/joyent/node/wiki/Using-Eclipse-as-Node-Applications-Debugger

Do note that when looking around at a similar problem i located this help ticket on google code, it relates to a number of users who are having problems with Node.js on windows:

http://code.google.com/p/chromedevtools/issues/detail?id=53

It might be worth just downloading the newest version of Node.js as I believe this now has the fix in place, else download the fix file then mention within the ticket.

like image 149
Matt Seymour Avatar answered Oct 01 '22 06:10

Matt Seymour