0

I received a JavaScript file and demo page .html, .js file contains many functions. When I run demo page I don't know what functions are running.

Is there any way to get name of the executed functions?

5
  • 1
    It's not quite as simple as what you are asking. The JS file may be using some of its functions internally. The only way to know for sure is to put the code into some tool where the code can be statically analyzed. Commented May 2, 2014 at 16:15
  • @Juhana: 19814 line, i don't want take time to reading a bulk of code, and many in them i don't need to use Commented May 2, 2014 at 16:18
  • Try running it through JSLint, and see what it tells you. Commented May 2, 2014 at 16:18
  • Basically at any given moment, there may be any number of functions executing in the 'stack', and many of them will be anonymous functions, so they won't have names. Furthermore, the stack will be in constant flux, with new functions being called or returned at any time. I'd recommend you start by getting familiar with the debugger statement. Commented May 2, 2014 at 16:19
  • @p.s.w.g Do we care about the anonymous functions, or only the ones that are specifically declared by name in the JS source? Commented May 2, 2014 at 16:19

1 Answer 1

2

You could load your page in Chrome and use JavaScript Profiling

https://developers.google.com/chrome-developer-tools/docs/cpu-profiling

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

I was also curious some thing like this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.