Error.stackTraceLimit = 2;
const a = () => b();
const b = () => c();
const c = () => d();
const d = () => e();
const e = () => {
throw new Error("My error");
};
try {
a();
} catch (e) {
console.log(e.stack);
}
// Only two frames in supporting engines; all frames in othersError.stackTraceLimit / notebook
Error.stackTraceLimit
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.