Does @WebStormIDE support break points in forked child_process yet? The new ndb does, so we know its "possible" :)
-
-
Replying to @paul_tavares
Do you use fork and not cluster in your app? With fork it now works in WS if you pass the debug port like this: fork('child.js', [], {execArgv: ['--inspect-brk=5860']}) With the NODE_OPTIONS env variable in node 8, we should be able to make a more 'elegant' way to debug such apps
1 reply 0 retweets 1 like -
Replying to @WebStormIDE
Thanks for the response. Yes, using fork not cluster. Will try out your suggestion. But it does seems cumbersome to add it directly to code for debug; remove it after debug is done and keeping track of unused port numbers. Looking forward for the more elegant way in WS :)
1 reply 0 retweets 0 likes -
Replying to @paul_tavares
We've reported a new issue that you can follow: https://youtrack.jetbrains.com/issue/WEB-34226 Please note that once implemented, this will only work with node 8+.
2 replies 0 retweets 1 like -
Replying to @WebStormIDE
Thanks for that - really appreciate you guys listening ot the community :)... Just ran a quick test with your suggestion: good news - no more "Exited with 12" abort :).. .but: I would have hopped WS debugger would get attached to the forked process - it did not. [1/2]
1 reply 0 retweets 0 likes -
Replying to @paul_tavares @WebStormIDE
instead, I had to http://[host]:[port]/json/list to get chrome-devtools url and use chrome to attach to it. FYI: in my case, I had the fork'ed process redirecting output to a file (not stdout) so at first, it just looked like your suggest "hangged" the process - not so :)
1 reply 0 retweets 0 likes -
Replying to @paul_tavares
We look into stdout/stderr for 'Debugger listening on ws://...' to get the right port for the child process and attach to it. If everything is redirected to a file, there's no way for us to attach to the process :( Having stderr set to 'inherit' would be enough for us.
1 reply 0 retweets 0 likes -
Replying to @WebStormIDE
Thanks for the insight. just did that (`stdio: [0, fd, "inherit", "ipc"]`) - but caused `Error: exited with 12` (:5860 failed: address already in use). A little more on my use case: Working with a CLI runner utility that executes "actions" concurrently through fork.
1 reply 0 retweets 0 likes -
Replying to @paul_tavares
We couldn't reproduce with the following code: const forked = fork('child.js', { execArgv: ['--inspect-brk=0'], stdio: [0, outFile, "inherit", "ipc"] }); Have you passed the port, right? Can you please submit us an issue with more detailed steps: https://youtrack.jetbrains.com/issues/WEB ?
1 reply 0 retweets 0 likes -
Replying to @WebStormIDE
Going to create a quick set of scripts to recreate and will open Issue. (BTW: thanks for reminding me about port number being 0 (auto assign :) )
1 reply 0 retweets 0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.