/    Sign up×
Community /Pin to ProfileBookmark

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

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@letmehaveagoFeb 10.2010 — 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.
    ×

    Success!

    Help @speghettiCode spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 6.16,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @nearjob,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,
    )...