Diagnosing JS error that is not reported

Discussion in 'Javascript' started by DrKen, Nov 28, 2011.

  1. DrKen

    DrKen Guest

    I am having trouble finding the error in my .js file. I have a web
    page that I am using outside of its web application in order to test a
    small change to a JavaScript file. I am getting an error while the
    page is rendering. It stops part way through rendering. My experience
    has been that this is a JavaScript error. However, when I try to open
    the .html file in Firefox, the Error Console seems to list no errors,
    warnings, or messages for the page. I opened Firebug on the page and
    then opened the .html file and the Firebug part disappeared. I tried
    using jslint but that gave me all sorts of grief over code that has
    worked for three years and stopped aorund line 30 instead of giving
    errors for the entire file . Is there a good tool to find JavaScript
    coding errors? Thanks.

    DrKen, Nov 28, 2011
    1. Advertisements

  2. 1) Get a proper news client
    2) help -> crosspost


    Denis McMahon
    Denis McMahon, Nov 28, 2011
    1. Advertisements

  3. I cut out sections of code, save, test, restore the code until I
    find a relevant change.


    Gene Wirchenko
    Gene Wirchenko, Nov 28, 2011
  4. Did two news articles really end up with the same message ID?

    John G Harris, Nov 29, 2011
  5. I read substantially similar (but not properly cross-posted) articles by
    the same OP in two newsgroups.

    I therefore diagnosed his problem as an inability to cross-post properly
    to usenet, restated his question to match his observed problem, and
    answered it. ;)


    Denis McMahon
    Denis McMahon, Nov 29, 2011
  6. In comp.lang.javascript message <[email protected]
    g2000yqn.googlegroups.com>, Mon, 28 Nov 2011 12:07:33, DrKen
    Then there is obviously at least one actual error in your HTML or
    JavaScript files. More detail cannot be given without seeing those

    One possible explanation is that you have a bad loop statement trying to
    execute an infinite (approximately) number of times, and that your
    browser has not got an enabled loop detector.

    Another is that your browser's error detector is nor detecting, perhaps
    being set to show only messages, Verify that by introducing a known

    A simple test is to introduce an alert(number) call at a place that you
    know execution reaches (to prove you can do it), and others where it
    might or might not be reaching. But be careful not to do that in high-
    count inner loops.

    Another test is to disable JavaScript and see whether the whole of the
    HTML renders as then expected. If it does not, you have at least one
    non-JavaScript error.

    You should, of course, have validated the HTML & CSS at www.w3.org, and
    have said so.
    Dr J R Stockton, Nov 29, 2011
  7. DrKen

    Tim Streater Guest

    Try using more browsers. Safari has a nice Develop menu, you can look in:

    Develop -> Show error console

    to see if there was a javascript error.
    Tim Streater, Nov 29, 2011
  8. DrKen

    J.R. Guest

    Debugging JavaScript:

    J.R., Nov 30, 2011
  9. You made it look as though he wrote the words you "quoted". That is a
    very wrong thing to do. You'll see it's the same as forging his name
    when you think about it.

    John G Harris, Nov 30, 2011
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.