npm-watch icon indicating copy to clipboard operation
npm-watch copied to clipboard

Can't attach debugger

Open michailw opened this issue 6 years ago • 5 comments

Hi, I find impossible to configure node.js debugger with npm-watch. Could you please add that feature?

michailw avatar Jan 04 '19 11:01 michailw

Could you describe what you need in a bit more detail? you want npm-watch itself to be listening for a debugger, or to enable it run commands that listen?

M-Zuber avatar Jan 23 '19 06:01 M-Zuber

I would like to enable it run commands that listen

michailw avatar Jan 30 '19 13:01 michailw

🤔 Do you happen to have a minimal script case that you would expect to work but doesn't?

M-Zuber avatar Feb 07 '19 19:02 M-Zuber

@michailw -

try this in a terminal with the cwd set to your project root:

node --inspect-brk=9222 ./node_modules/.bin/npm-watch

Then open chrome://inspect and attach to the debugger.

That should do it unless npm-watch spawns a new process for executing watch scripts.

justinwilaby avatar May 04 '21 21:05 justinwilaby

npm-watch does spawn new processes, but if I understood correctly, @michailw - your question is how to have npm-watch run a command where the command is listening for a debugger?

I have not managed to produce a test case, so I would appreciate it if you could send me a minimal case that you would expect to work, but it doesn't

M-Zuber avatar Jun 13 '21 17:06 M-Zuber