--debug-brk is treated like --debug when Node runs a script that has a symlink in the path.
So, node --debug-brk /real/path/script.js works properly, but node --debug-brk /symlink/script.js does not.
node --debug-brk /real/path/script.js
node --debug-brk /symlink/script.js
Tested with v0.5.4-pre.
I can reproduce this on 0.5.11-pre. Trying to figure out a fix, on the surface it seems like node.cc is falling down the right code path.
As of node v0.6.8 I can reproduce this bug
I think I found it.
I think https://github.com/joyent/node/blob/master/src/node.js#L85 needs to be symlink-aware.
process.argv = fs.realpathSync(process.argv);
Hmm... that change doesn't work because it breaks extension-autocompletion. Also, I have no idea on how to test it in a fast way - I'd have to test whether a process does not exit, and isaacs said tests shouldn't take more than a dozen milliseconds or so, but here, it seems to take much longer:
[jann@Jann-PC tmp]$ time node test.js
The solution for this would appear to require diving into lib/module.js. That is dragon-filled territory, in part due to the very issue that prevented @thejh's elegant patch from succeeding.
This code should probably go where we're loading the main module in lib/module.js
Fixed in 27c8572