473,804 Members | 2,711 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to find out what javascript is running

Hi All,

I have inherited a web page that includes lots of javascript. When I
click on some things, the CPU utilization on the browser machine goes
to 100% and the browser becomes unresponsive until it is done doing
whatever it is doing.

Is there any clever way (in any browser) to interrupt or pause the
execution of the javascript so that I can identify what is running
that is taking so long?

-Chris
Nov 29 '07 #1
6 4364
Chris Curvey said the following on 11/29/2007 9:27 AM:
Hi All,

I have inherited a web page that includes lots of javascript. When I
click on some things, the CPU utilization on the browser machine goes
to 100% and the browser becomes unresponsive until it is done doing
whatever it is doing.

Is there any clever way (in any browser) to interrupt or pause the
execution of the javascript so that I can identify what is running
that is taking so long?
Any way you find is going to fall into the category of "debugging" .

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 29 '07 #2
Chris Curvey wrote:
Is there any clever way (in any browser) to interrupt or pause the
execution of the javascript so that I can identify what is running
that is taking so long?
If you install MSD (Microsoft Script Debugger) or Visual Studio, then in
IE, you can select View->ScriptDebugg er->Break at Next Statement, and it
will stop immediately on the next executed line of script. In Visual
Studio you can look at the call stack and find out where you are and
where you came from.

I think there's a tool from Yahoo (the YUI team) that will show you
what's going on in your script. It's meant for performance tweaking. I
tried it once for a couple of minutes. I think it's called YSlow (or
something like that) and runs in Firefox.
Nov 29 '07 #3
On Nov 29, 9:27 am, Chris Curvey <ccur...@gmail. comwrote:
Hi All,

I have inherited a web page that includes lots of javascript. When I
click on some things, the CPU utilization on the browser machine goes
to 100% and the browser becomes unresponsive until it is done doing
whatever it is doing.

Is there any clever way (in any browser) to interrupt or pause the
execution of the javascript so that I can identify what is running
that is taking so long?

-Chris
The best JavaScript debugger I've seen is "Firebug" for Firefox. You
can edit, debug, and monitor CSS, HTML, and JavaScript live in any web
page: https://addons.mozilla.org/en-US/firefox/addon/1843

www.vunet.us
www.worldincatalog.com
Nov 29 '07 #4
VUNETdotUS wrote:
>Is there any clever way (in any browser) to interrupt or pause the
execution of the javascript so that I can identify what is running
that is taking so long?
The best JavaScript debugger I've seen is "Firebug" for Firefox. You
can edit, debug, and monitor CSS, HTML, and JavaScript live in any web
page: https://addons.mozilla.org/en-US/firefox/addon/1843
You can't do what the OP wants though. Make it "interrupt" the currently
running script.
Nov 29 '07 #5
Chris Curvey wrote:
Hi All,

I have inherited a web page that includes lots of javascript. When I
click on some things, the CPU utilization on the browser machine goes
to 100% and the browser becomes unresponsive until it is done doing
whatever it is doing.

Is there any clever way (in any browser) to interrupt or pause the
execution of the javascript so that I can identify what is running
that is taking so long?

-Chris
Hi,

A few strategically placed alerts() can help a lot to pin down the part
that is demanding a lot of the CPU.
Simply examine the scripts, do an alert before something starts.
During the alert-box javascript waits for you to press ok.
If it takes a long time to the next alert, you know roughly where to
investigate futher.

It is not the most elegant way, but it helped me out a few times. :-)

Regards,
Erwin Moller
Nov 29 '07 #6
Response to Stevo <pl****@spam-me.com>:
VUNETdotUS wrote:
>>Is there any clever way (in any browser) to interrupt or pause
the execution of the javascript so that I can identify what is
running that is taking so long?
The best JavaScript debugger I've seen is "Firebug" for Firefox.
You can edit, debug, and monitor CSS, HTML, and JavaScript live
in any web page:
https://addons.mozilla.org/en-US/firefox/addon/1843

You can't do what the OP wants though. Make it "interrupt" the
currently running script.
I believe that is what the breakpoints are for.

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
Dec 4 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1570
by: Fabrice Labrousse | last post by:
Hello, Here is a hard problem i cannot solve about window.opener method I think you'll need to be a specialist to find the solution... i can't find the solution by myself ! Please help me. Here is the problem (quiet complicated to explain). I use two differents servers with two IIS 4.0 Web servers On the first one (let's name it Server1) i got my web site. On my web site,
4
2384
by: mscir | last post by:
I would like to generate a page of links including some of the pdf properties (title, author, version, etc.) for a folder full of pdf's. Is this possible from Javascript? TIA, Mike
7
2579
by: murrayatuptowngallery | last post by:
Hello: I previously posted a question about how to do populate an html table dynamically with results from JavaScript Math and basic math. Dr Clue responded and this started the learning curve. I think the terminology for what I want to do is pass variables to the <td> 'workspace' (half this statement might make sense). The problem I am having is being overwhelmed with understanding the context of each new statement, syntax etc.
3
1544
by: 2stepme | last post by:
I am sorry to put this question up (because it has been asked and addressed many times) but I have searched and I been unable to solve my problem. I am running XP PRO Version 2002 SP2 on my laptop. I am using the Web Matrix Server version 1.1.4322.573 and I am working on validation which requires javascript. When I try to test my script I get the following message: Unable to find script library...
27
4626
by: one man army | last post by:
Hi All- I am new to PHP. I found FAQTS and the php manual. I am trying this sequence, but getting 'no zip string found:'... PHP Version 4.4.0 $doc = new DomDocument; $res = $doc->loadHTMLFile("./aBasicSearchResult.html"); if ( $res == true ) { $zip = $doc->getElementById('zipRaw_id')->value; if ( 0 != $zip ) {
67
3308
by: Robert | last post by:
Hi, I have been reading the article at http://www.crockford.com/javascript/private.html and I was wondering if there also was some way to be able to have private methods that can be called from public methods, but not from outside. Just throwing an exception if a private method was called from outside would be sufficient, but I don't know how to determine if the method was called from outside. Anyone else thought about doing this?
3
2798
by: =?Utf-8?B?R3JlZyBN?= | last post by:
Hello, I'm running an asp.net, intranet web application using .net framework 1.1 on IIS5.1 / 6.0. Through the web application, I would like to press a button on the web page, have another window (not web-based or part of current application) brought to the front and focused (findwindow api) and have the button scrape the contents of the focused window so the contents can be parsed and entered into the web application. Ideally, I would...
2
3193
by: daniel_nolan | last post by:
I'm brand new to Python--and programming in general. I'm trying to use IEC to control Internet Explorer. I've navigated to a page, and now I'm trying to click a button. The button appears to be called 'PDF Preview' but I honestly do not know whether that's the name or the caption. Here is my code: from win32com.client import Dispatch import IEC
11
2082
by: Helmut Jarausch | last post by:
Sorry, but I'm a complete newbee! I need find out under which userid the browser is running. Is this possible with JavaScript? Many thanks for a hint, Helmut Jarausch Lehrstuhl fuer Numerische Mathematik
0
9704
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10561
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10318
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9132
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5505
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2976
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.