This plugin is free (with tips greatly appreciated if you can), so I'll post it without CWs: https://tamschi.itch.io/command-error-backtrace
It adds non-JS (i.e. Command-based) stack traces to any Error that occurs in code created in the RPG Maker MV editor, so you can see *exactly* where the problem occurred from the error screen alone.
It also makes errors easy to copy for you/the player, so you can collect more accurate bug reports with less friction.