1 Reply Latest reply: Feb 27, 2009 12:33 PM by ipdustin
ipdustin Level 1 Level 1 (0 points)
Sometimes the console on Safari's Web Inspector doesn't show me javascript errors. This makes debugging a page harder (e.g., I think a page is free of JS errors, when really Safari just isn't showing them to me).

This is how I expect it to work: I load a page and open the Web Inspector. It shows me any JS errors. If I reload the page, the Inspector also reloads and shows me the JS errors. Often it does work this way.

Sometimes, though, one some pages, when I reload the page, the Inspector clears and reloads like above, but the JS errors don't show up in the console (I do get a red indicator next to the JS file with the number of errors). If I close the inspector and reopen it, the errors then show up.

I have tried restarting Safari, restarting my computer, and reinstalling Safari. This is Safari Version 3.2.1 (5525.27.1).

Mac OS X (10.5.6)
  • ipdustin Level 1 Level 1 (0 points)
    I am using jQuery and calling my javascript using $(document).ready(). When, on the same page, I call my JS using window.onload, the errors show up like I would expect. I hope I have got something else wrong, because this would seem to discourage writing unobtrusive javascript.