Let's take a look at node-report, a project which helps you to do post-mortem diagnostics & figure out what went wrong with your Node.js app in production.
Let's take a look at the available options & tools to debug Node.js - the pino & debug modules, the built-in debugger, the v8 inspector & Visual Studio Code