Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

354
Views
How to see the number of function calls and if possible the function names that are in the stack real-time

Is there a way in real-time to see the number of function calls that are in the stack before or regardless of whether the stack size might be exceeded? Could it be shown like this:

console.log("Function: " + funcName + ", nbr of calls in the stack: " + funcCount);
// Function: foo, 22
// Function: bar, 300
// etc...

Functions are called like this:

var mod = function () { 
   var obj = {
        foo: (fn) => "My name is: " + fn, 
        bar: (fn) => "My name is: " + fn
    };
    console.log(((fn) => obj[fn](fn))("foo"));
    console.log(((fn) => obj[fn](fn))("bar"));
}; 
mod();
// My name is: foo
// My name is: bar

So the function when running knows its name since it's passed in.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!