how to get list of javascript methods used/called in an individual page?
Is there a way in javascript or any tool through which I can find list of javascript methods used/called in an indiv开发者_C百科idual page
If you want to find out which functions were actively used, you can use Firebug's profiling feature.
Cick "Profile" in its console tab, reload the page, use the page in whatever way you need to, then click "Profile" again to get a listing of the functions which were used, how many times they were called and how long they took.
If you want to trigger profiling on a particular section of your code, you can use calls to the Firebug console API - console.profile()
to start profiling and console.profileEnd()
to stop profiling.
If you want to see what's available for use on the page, switch to Firebug's DOM tab, use its configuration dropdown to uncheck every option but "Show User-defined Properties" and "Show User-defined Functions" and you'll be able to easily see everything that's been added to the global scope by your JavaScript.
You can also use eclipse kind of editor or browser based script tools like fire bug and chrome default developer tool.
精彩评论