debugging a node application with eclipse

I followed this tutorial and got Eclipse to recognize the program I'm debugging.

However, after setting a break point, and steering the application to the break point, the application just seems to ignore it.

The code continues merrily as if nothing happened, and I don't get to see the variables I'm trying to look at.

Unfortunately I don't know what info to include here, so if you need more information, just let me know in the comments.

You have to be careful with what you are doing. There are some pitfalls when debugging node applications in eclipse. Here are some tips that might help you.

  1. Start your application with node --debug-brk your-script.js
  2. Start the debugger in eclipse
  3. Step over (F6) the first few require statements, that import the code you want to debug.
  4. Set your breakpoints. (Be sure you don't set breakpoints in the source files you are currently editing. When debugging, there is a "Project" in your workspace that contains all the scripts that are loaded by node. Set your breakpoints in some one of these files. Otherwise the breakpoints will be ignored.)
  5. Most often you want to set breakpoints at the beginning of a callback.
  6. Then resume (F8) the script and it will pause at the first breakpoint it passes.

Start with that until debugging works for the first time. After that you can try more unconventional cases.