The problem is in the title - IE is misbehaving and is saying that there is a script running slowly - FF and Chrome don\'t have this problem.
How can I find the prob
If you have control over the JavaScript, you could break it into separate scripts or try a Lazy Load approach.
Just my $.02
There are few reason for this kind of alert
No. of JS instructions executed by IE exceeds predefined limits. This can be fixed by editing windows registry see Here
Optimize the javascript code so that execution time is reduced.
Long running scripts are detected differently by different browsers:
Nicholas Zakas has written an excellent article covering this topic.
As such - the best way to avoid these problems is by reducing looping, recursion and DOM manipulation.
I don't believe there's a tool that can find the offending script. You might try attaching an IE debugger like Visual Studio and maybe it will break at the point where the problem is occurring. But I can't give any guarantees on that working.
In the past when I've had similar problems I've simply commented out sections of code to test narrow down where the issue is occurring, usually in a binary search type pattern. Comment out half of the javascript libraries, etc...
Aside from that as others have said, this type of problem occurs from large loops and many setTimeout function calls or setTimeout recursive loops.
If javascript ties up page processing for more than 10 seconds, you get this message. IE obviously has a slower javascript engine, causing this.
I'm guessing that some code optimization will certainly help, and try reducing the amount of javascript executing on page load. Perhaps use setTimeout() to defer processing of some unnecessary things if you have to.
As far as tools go, use Firebug's profiler to see where you're spending so much time.
I found that adding alert('before X') alert('after X') was helpful for me to find my issue. I added them to my $(function () {
}