1

I want to debug a NodeJS Express app that is using Gulp. Is this possible in Eclipse? I tried it with Nodeclipse-plugin and it worked for normal NodeJS Express apps, but not for one that used gulp (I imported the project via EGit, as described in this post). After starting the debugging, the debugger just stops after the first line saying Chromium requested a shutdown.

How do I import a Github repository into Nodeclipse (Enide)?

How can i debug this?

Community
  • 1
  • 1
Dan
  • 61
  • 12

2 Answers2

0

If you want to use the terminal you can install node-inspector.

$ npm run node-inspector -g

Check in the package.json what's the name of your main file. Check the start command and which file does it point to.

Then, find the start command in GulpFile.js. It's something that look like node <js-file> or npm start. Replace it with node-debug <js-file>.

German Attanasio
  • 22,217
  • 7
  • 47
  • 63
0

The latest NodeJS 6.3.0 has built-in support for debugging in Chrome Dev tools.
Simply run node --inspect and it'll give you a URL to paste into Chrome.

yazeedb
  • 133
  • 1
  • 10