简体   繁体   中英

Firefox Internal Error: too much recursion - how can I show more stacktrace to make clear where problem originated?

I managed to either trigger bug in one of libraries that I used or I passed invalid data there.

Fine, it happens. But to diagnose what happened it would be nice to know where I actually call this library function. But Firefox "helpfully" truncated stack trace.

How can I get access to a full stack trace?

在此处输入图像描述

You could set a breakpoint on the 3537th line of the lunar_assembler.dist.js file. It would allow you to display the full stacktrace (and the initial caller) before the recursion begins.

See https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Set_a_breakpoint

This allows to display a dynamic view of the current stack where you can click on every frame to check every function call, their lexical scopes, the parameters being passed to the subsequent calls, etc...

  1. To set a breakpoint , you can place debugger in the place where you want to stop loading

  2. To get a call stack in the old versions of JS you could use arguments.callee - example

  3. In the strict mode and newer versions, you can use new Error().stack - example - or console.trace() - example

Woah, in mine case, function had same name as constant inside this function. And it doesn't have any conflicts and worked in Chrome

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM