logo

Debugging JavaScript

Stephen Neal writes to me every now and then with little hints and tips to pass on. Yesterday it was to tell me how to force a "breakpoint" in IE's JavaScript debugger. All you have to do is include the debugger statement at the point in your code where you want code execution to pause.

IE pausing JavaScript execution at the debugger statement

Some of you will see the benefit of this straightaway and some of you might need it spelling out. This blog entry started from a different angle. I was going to write a guide to using it and example of how useful it can be. It started getting quite long. Almost the length of an article! That's when I thought it would be best added to a re-write of this article, from over 2 years ago, about the basics of the debugger.

Back when I started codestore I was knocking out loads of articles like this one - short and to the point. Nowadays I would use a blog entry to get a point like this across and only tend to write articles about things a little more in depth. Now I tend to start writing blog entries and see if I can't squeeze it all in. This time I couldn't and I will try and get it all in to an article before long. Still, it's a really nice "quick" tip. Thanks Stephen. Now, what about the rest of you? Where are your tips?

Comments

    • avatar
    • veer
    • Thu 18 Dec 2003 09:08

    ok, so, i read jake's comments, install the debugger and open my browser, my homepage has a javascript error and i get the annoying error message.

    i remember how painful having this debugger was and how it always prompted me for error messages when i had it before and why microsoft hasnt fixed it yet.

    so, i uninstall it from control panel and restart my computer, i get the error message again.

    the program is not in the list in control panel, my folder "Microsoft Script Debugger" inside the program files where i installed it, is empty. but why am still having an option as "Script Debugger" in my View of my IE?

    Any ideas?

    • avatar
    • Jake
    • Thu 18 Dec 2003 09:23

    Veer. This is codestore.net not support.microsoft.com ;o)

    Sounds like you need to close all open IEs for it to take effect.

    Easier than uninstalling the debugger is disabling JavaScript errors on IE's advanced options.

    • avatar
    • Chimpy McGregor
    • Thu 18 Dec 2003 09:29

    tips?

    ok, how about this for a tip:

    dont go outside without your trousers on. its too cold.

    • avatar
    • Jerry Carter
    • Thu 18 Dec 2003 12:23

    Here's are some valuable tips for you, culled from some of my own experiences.

    When you make an adjustment to the handlebars on your bike, be sure to thoroughly re-tighten things BEFORE heading off down a hill.

    Japanese beetls wings contain a powerful anasthetic... one once landed on my beverage just as I was taking a sip - numb lips for about 10 minutes.

    When working with electrical wires, wear some leather gloves (goat or sheep, even pig - thin and supple enough for detailed work). Especially true with stout wire, when you snip it, you make a sharp bevel. Working with this with bare hands will invariably lead to a few scratches here and there.

    And finally, related to the last bit, after you put your gloves on and start working on the electrical wiring in your house: Turn off the main. !YAAAAGGGG!

    • avatar
    • F585 WMS
    • Thu 18 Dec 2003 14:03

    Can't afford a vanity license plate with your name on it? It's actually much cheaper to change your name to match your current license plate...

  1. Jake,

    If you want, I can write you an article on the ultimate webview. It contains:

    - sortable columns for every kind of field (dates, number, string, url)

    - one click export to excel function

    - lots of tricks to make the view ultra light in loading

    It is too long to just describe it here as a trick, I would probably want to attach a simple sample database to it. I haven't invented it all myself, but I have combined the inventions of others. One being a 22 year old student with no prior notes experience, but a lot of time. I write rather boring, but effective, maybe you could lighten the text up.

    • avatar
    • John
    • Fri 19 Dec 2003 03:14

    I like the sounds of some of laurens ideas - how about it Jake ?

    • avatar
    • Jake
    • Fri 19 Dec 2003 04:32

    Sounds good Lauren. Can you send a sample database over before we go as far as an article?

    • avatar
    • MozillaFan
    • Mon 22 Dec 2003 05:22

    Have you tried using the Javascript debugger included with Mozilla? (Not the javascript console). It's a bit complicated to get started but, as it was specifically designed to debug javascript, I find it much more powerfull than IE's.

    Lately, when developing webs, I've been using MozillaFirebird + some developer extensions, and I can't believe I survived so many years using IE. I can press ctr+8, for example, and a window will appear where I can modify the CSS of the webpage I'm seeing, in real time. Neat!

    • avatar
    • MozillaFan
    • Mon 22 Dec 2003 05:26

    I just thought I should include a link to the webpage listing extensions for MozillaFirebird, so that you can see what I'm talking about:

    {Link}

    I wasn't so happy (as a web developer) since I discovered TopStyle years ago ^_^. MozillaFirebird rocks!

    • avatar
    • Chris Tseng
    • Tue 27 Apr 2004 01:47

    Please try to use Microsoft Script Editor (part of FrontPage 2003) instead of Microsoft JavaScript Debugger. Then it should be solved the headache of JavaScript debugging. Hope it helps,

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Thu 18 Dec 2003

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

More Content