1

I am trying to follow the instructions on how to debug node.js applications with Eclipse. But the breakpoints don't get enabled as shown in the screenshot below. Can anyone point me to the solution.

enter image description here

5
  • Is this your own screenshot, or a screenshot from the instruction site? Commented Jan 6, 2013 at 14:17
  • My screenshot. As you can see there is a line through the circle which says that the breakpoint is not enabled. That is my problem. Commented Jan 6, 2013 at 14:19
  • diagonal line through breakpoint: all breakpoints have been disabled (button skip all breakpoints in breakpoint view) Commented Jan 6, 2013 at 14:20
  • Oh man.. How could I miss that. Thanks a lot for your help though. Otherwise I would have spent a lot of time without seeing that. Can you put that as an answer so I can accept? Commented Jan 6, 2013 at 14:23
  • Happy to have saved you some hours :) I have added my answer now Commented Jan 6, 2013 at 14:25

2 Answers 2

1

It looks that your breakpoints are disabled. Enable it by uncheck skip all breakpoints in breakpoint view.

Sign up to request clarification or add additional context in comments.

Comments

0

Heh, you're working with the same tick function that they used in the tutorial I read. Probably the same tutorial.

Another interesting thing that I found when setting up Eclipse like this is that to be able to debug a real app you have to delay it from running, like the ticker does, but a little more intelligently of course. Here's how I'm doing it so far .. (hopefully this will help as well):

function __myapp_start() { console.log('Running app ...'); // run your app here ... }; if (process.argv[2] === '-dbg') { // `node --debug myapp.js -dbg` wait for the debugger to connect. function __myapp_pause() { var paused = new Date().getTime(); debugger; // will return immediately if the debugger is not connected yet var started = new Date().getTime(); if (started - paused < 500) { // if we returned relatively quickly, assume we're not connected and loop setTimeout(__myapp_pause, 500); } else { // the debugger actually paused and took time to return; we're connected. run. __myapp_start(); } } __myapp_pause(); // attempt to pause the debugger until it actually does pause, then continue } else { // normal production path __myapp_start(); } 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.