Node debug with junctions/symlinks

I have a thorny situation with debugging node js code when using a folder that is a junction.

When I open/edit a file from a folder which is a junction and set breakpoints in it, the breakpoints will not hit. I need to open the actual file for the breakpoints to hit correctly.

A. c:\temp\project\test.js                                             -- Original file
B. c:\sources\project   <=> c:\temp\project\test.js         -- Junction folder pointing to c:\temp\project   (Note that only c:\source is in an idea project and visible  in webstorm)

If I open test.js in folder A, everything works, if I open it in folder B it doesn't. I have tried creating a library and setting everything as such, to no avail. It's a shame because it makes working with a lot of junction sort of impossible.

For reference, I am on windows 7.

Comment actions Permalink

Alright. I'v gotten closer to a solution. The bug doesn't come in all cases. It seems to only be when there is a junction in a node_module folder. I made a tiny sample project that correctly reproduces the issue (see attachments).

To reproduce, follow these steps:

-- Setup --

  1. Unzip to c:\temp
  2. run "create_junctions.bat" in c:\temp\junctionBug (with admin privileges since it creates junctions)
  3. Open the c:\temp\junctionBug\junctionBug project in webstorm (I am using 7 EAP 130.1362 but I think it repros in 6 too).

-- Bug --

  1. In the webstorm project, set a breakpoint in the moduleB/node_modules/moduleA/index.js at line 2 (arg += 12;)
  2. Run app.js in debug -- NO BREAKPOINT HIT!!

Whereas if you Open the file c:\temp\junctionBug\external\moduleA\index.js, set a breakpoint at the same line and run in debug, the breakpoint will hit!

It would be wonderful if this could be fixed, as I could have junctions all over the place and develop locally with a smile  on my face and love in my heart.


Comment actions Permalink

Hi there,

If you can reliably reproduce this behaviour then please submit a new Bug ticket directly to the Issue Tracker at

But before that:

  1. What WebStorm version do you use exactly (Help | About) ?
  2. Please try latest v7 EAP build:

Please sign in to leave a comment.