user1053334
user1053334

Reputation: 161

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 ?

Upvotes: 8

Views: 5899

Answers (3)

Netaji Borade
Netaji Borade

Reputation: 1

Just try this :

After creating the project, go to the cmd and provide the filepath of the file which you want to debug. Now run the command node --debug-brk demo_node.js (where demo_node.js is filename)

Now come to eclipse side, open the same file and set the break points. Right click on the source file and select [Debug As]-[Node Application].

Upvotes: 0

tomotaro1065
tomotaro1065

Reputation: 11

You can try to test for Nodeclipse version 0.2.0 beta.

http://www.tomotaro1065.com/nodeclipse/

GENERATING OF EXPRESS PROJECT

Select the [File]-[New]-[Project] menu.
Select [Node]-[Express Project], and push [Next] button.
Enter [Project name], and push [Finish] button.

DEBUGGING

Open the JavaScript source files that you want to set breakpoints.
Double-click on the ruler at the left end of the line you want to set a breakpoint.
If you want to remove a breakpoint, double-click on the ruler again.
Select the main source file of Node Application on the Project Explorer, open the context menu by right-clicking, select the [Debug As]-[Node Application] menu.

Upvotes: 0

Matt Seymour
Matt Seymour

Reputation: 9395

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.

Upvotes: 3

Related Questions