github.com/VoltCruelerz wrote a fantastic script that interrupts the Roll20 API on a crash, converting the unhelpful global line number in the error message to a local number that directly refers to the lines in each of your scripts. It's an absolutely invaluable debugging resource! The original script is here , but I've forked it to add a few extra features: chat message is now HTML formatted for easier reading/clarity log message parsed for easier reading and, most importantly, ALL line references in the stack trace are converted to local (in the original script, only the first error line is converted) Original Script by VoltCruelerz My Fork Chat Message: Console Output: (It goes without saying that VoltCruelerz is more than welcome to merge my fork into the master, if he approves!)