Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase number of Call Stack entries in Google Chrome Developer Tools (or Firefox)?

How to increase number of Call Stack entries in Google Chrome Developer Tools (or Firefox Firebug)? I am getting a Javascript error in a third party control's Javascript. All the calls in the Call Stack window do not belong to my own code. I want to know which line in my code triggered the sequence of events. The Call Stack is not large enough to display something from my own code.

like image 573
Tony_Henrich Avatar asked Mar 29 '12 18:03

Tony_Henrich


People also ask

What is the limit of a call stack?

Without any local variables, each function call takes up 48 bytes during the execution, and you are limited to less than 1MB for all local function frames. Each boolean and number variable takes 8 bytes of memory.

Where is call stack in Chrome dev tools?

View the Call Stack To view the call stack, open DevTools Sources panel and on the right panel, expand the Call Stack panel to see all the current functions in the call stack.

How can I see my call stack In Firefox?

Right-/Ctrl- clicking in the call stack pane opens a context menu with the following items: Restart frame restarts execution at the beginning of the current frame.

What is the maximum call stack size in Javascript?

The consequences of applying a function with too many arguments (think more than tens of thousands of arguments) vary across engines (JavaScriptCore has hard-coded argument limit of 65536), because the limit (indeed even the nature of any excessively-large-stack behavior) is unspecified.


2 Answers

Chrome solution

https://v8.dev/docs/stack-trace-api

can set via commandline on startup --js-flags="--stack-trace-limit <value>"

or at runtime at loading a page: Error.stackTraceLimit=undefined //unlimited stack trace

like image 58
JasonS Avatar answered Sep 21 '22 18:09

JasonS


In Chrome (also in node), you can type this in the js console:

Error.stackTraceLimit = Infinity; 

Alternatively see this page for Chrome command line flags: https://v8.dev/docs/stack-trace-api (need to restart Chrome):

$ google-chrome --js-flags="--stack-trace-limit 10000" 
like image 33
Vlad A. Ionescu Avatar answered Sep 21 '22 18:09

Vlad A. Ionescu