I am trying to use debugger with a gulpfile which runs 8 - 9 node.js servers Even after running debbuger nothing shows up on frames even after executing the code.
Make sure that to modify your Gulpfule to start servers with --inspect-brk, enable the Reconnect automatically option in the Attach to a Node.js/Chrome run configurations (you will need creating a separate config for each script), start your gulp task, then attach the debuggers
What task(s) do you use to run your node servers with Gulp? What does your Gulpfile look like?
My gulpfile
*Removed Image*
Debugging works as expected for me when using similar setup, but it breaks as soon as I modify the code because servers are restarted with
nodemon. We recommend using the Attach to a Node.js/Chrome debug configuration to debug scripts that usenodemon, see https://www.jetbrains.com/help/webstorm/2021.2/running-and-debugging-node-js.html#nodemonMake sure that to modify your Gulpfule to start servers with
--inspect-brk, enable the Reconnect automatically option in the Attach to a Node.js/Chrome run configurations (you will need creating a separate config for each script), start your gulp task, then attach the debuggersThank you so much Elena!
This was really helpful.