MongoDB's shell extends SpiderMonkey. Is there a way to hook into some of SpiderMonkey's debugging support? I haven't been able to find a way to do even simple things like activate an onerror() handler to print call stack traces on unhandled exceptions.
Per @cdleary's point, it looks like MongoDB's shell has not integrated SpiderMonkey's debugging support.