Debugging JavaScript in Safari

Joined
Jul 31, 2013
Messages
2
Reaction score
0
Points
1
Hello,

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.

-Eric
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Take a look at this document.
 
OP
E
Joined
Jul 31, 2013
Messages
2
Reaction score
0
Points
1
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.

-Eric
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top