npm-watch
npm-watch copied to clipboard
Can't attach debugger
Hi, I find impossible to configure node.js debugger with npm-watch. Could you please add that feature?
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?
I would like to enable it run commands that listen
🤔 Do you happen to have a minimal script case that you would expect to work but doesn't?
@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.
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