NiM is the BEST way to debug Node.js.
Also, please help by sharing NiM with one of the share links on this page.
And feel free to drop me a line,
NiM and Node.js Diagnostic Reports with Brakecode
Check out the brakecode npm package 📦that works with NiM and read about it here https://june07.com/nodejs-diagnostic-reports. You will also find a short tutorial on how to use NiM with Brakecode here https://blog.brakecode.com/nodejs-diagnostic-reports.
NiM Extension for VSCode
Check out the VSCode Extension that works with NiM and read about it here Absolute Simplest Node.js Debugging - VSCode/DevTools.