Mac Forums

Mac Forums (
-   OS X - Operating System (
-   -   Debugging JavaScript in Safari (

ewgoforth 07-31-2013 03:32 PM

Debugging JavaScript in Safari

I'm trying to troubleshoot some problems my website has with Safari. I have Safari 6.0.2 running on a Mac that I'm remoted into via iRAPP. I'm not sure what version of the OS this Mac is using.

From the research I've done, I should be able to step through my JavaScript by going to the Menu and choosing Develop->Start Debugging JavaScript. I've added the Develop menu to my Safari, but I don't see that option, just Start Profiling JavaScript and Start Timeline Recording.

I've added a debugger statement to my JavaScript, but Safari acts as if it isn't there. I've debugged in Chrome, Dragonfly (pre-webkit Opera), FireBug, Venkman, and IE Developer Tools (IE6-10); this is my first time in Safari.


vansmith 07-31-2013 03:40 PM

Take a look at this document.

ewgoforth 07-31-2013 04:13 PM


Originally Posted by vansmith (Post 1529412)
Take a look at this document.

Thanks, that had some useful information, but the only method I saw for stepping into your JavaScript (Putting a breakpoint next to the line of code), didn't really make sense in the context I'm in. I don't have a big block of JavaScript, like a standalone .js file, but instead have a block that's onclick attribute of an anchor tag.

I did figure out how to get it to break though. I found in the little icon bar at the top of the Web Inspector, to the right of "Issue" (Exclamation Point) icon, I found a debug icon. The icon looks kind of like two horizontal parallel lines with a dashed line in the middle. I clicked on that and the next time I clicked on my anchor, it "saw" the debugger statement and stopped there.


All times are GMT -4. The time now is 03:08 PM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.