2

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?

enter image description here

reducing activity
  • 1,985
  • 2
  • 36
  • 64

2 Answers2

2

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...

Guerric P
  • 30,447
  • 6
  • 48
  • 86
1
  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

Anonymous
  • 1,823
  • 2
  • 35
  • 74