www.webdeveloper.com
Results 1 to 2 of 2

Thread: How to Determine which function is running

  1. #1
    Join Date
    Sep 2008
    Posts
    93

    How to Determine which function is running

    Hello,

    I have a page with a number of iframes and a couple thousand lines of javascript (which I won't ask you to troubleshoot -- everything works fine).

    The situation is that the cursor is flickering as though there's a javascript function continuously looping--which may be affecting performance.

    The question: Is it possible (and how) to determine which function is running? Where might I be able to find a log of the functions which have already ran?

    I suspect firebug or IE developer tools should have something like this but I cannot find any supporting documentation. Any ideas?

    Thanks,
    Josh

  2. #2
    Join Date
    Feb 2010
    Posts
    184
    firebug, ie developer tools and chrome's inspect element all have some way to show the call stack.

    In chrome,

    1. right click and select inspect element
    2. click the "Scripts" tab
    3. on the left side line number bar, left click to add a break point
    4. refresh the page and it will stop on the break point
    5. on the right hand side, click call stack to make it slide down

    pretty much the same with the other tools too.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles