Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Safari and Javascript debugging Web Browsers
Want an easy way to debug Javascript?
  1. Activate the debug menu in Safari, either by using the excellent Safari Enhancer or by shell command defaults write com.apple.Safari IncludeDebugMenu 1
  2. Check the option "Log JavaSript Exceptions" in the Debug menu
  3. Check your Console.app and there is your output!
[robg adds: Mozilla also has access to a Javascript debugger in the Tools -> Web Development menu.]
    •    
  • Currently 2.75 / 5
  You rated: 3 / 5 (8 votes cast)
 
[47,301 views]  

Safari and Javascript debugging | 4 comments | Create New Account
Click here to return to the 'Safari and Javascript debugging' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Safari and Javascript debugging
Authored by: roxeteer on Sep 10, '03 10:35:01AM

Camino automatically logs JavaScript errors to Console.log.



[ Reply to This | # ]
Safari and Javascript debugging
Authored by: seanhussey on Sep 10, '03 11:29:34AM

I was actually a bit disappointed with the Javascript logging enabled by this hint (Not a reflection of the hinter! :) ). The best JS debugging I've seen was in Netscape 4.72 (you typed "javascript:" into the location bar and the console popped up with errors, line numbers, etc).

Is there a browser for OS X that has a comparable debugger? Mozilla?



[ Reply to This | # ]
Safari and Javascript debugging
Authored by: J0l on Sep 10, '03 11:35:28AM

Netscape 7.1 and Mozilla 1.5b (the versions I am running here) but work with the javascript: in the address bar.

One thing to remember in Mozilla is that you can sometimes get the error

"Error: popup has no properties
Source File: chrome://navigator/content/mailNavigatorOverlay.xul
Line: 149"

which is nothing to do with the page you are browsing but the application and installation itself, so well worth clearing that before you start debugging.



[ Reply to This | # ]
Try Venkman in Mozilla
Authored by: Essington on Sep 10, '03 12:14:55PM

The best javascript debugger I have seen is "Venkman"

http://www.mozilla.org/projects/venkman/

which is part of the Mozilla project.

I is a full on debugger, not just log information. you can see variable values, what is in scope, and step through the code.



[ Reply to This | # ]