Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Safari Code Inspector in Mountain Lion - where are my needed features?

I just upgraded to Mountain Lion and am having some problems with Safari. I am a web developer and have come to rely on Safari's Code inspector to test and debug my websites. I use it all day long.


With the new version, there are two huge problems:


1. No longer shows line numbers in the css style declarations; they appear to be all lumped together making it very hard to find what I need to edit

2. When the code inspector is open, Safari won't load a new page. It just sits there until you close the inspector. The previous version would just refresh when a new URL was visited.


Am I missing something on how to enable these features? It's really slowing me down. Thanks for your help.

iMac, OS X Mountain Lion, Safar Code Inspector

Posted on Jul 26, 2012 8:12 AM

Reply
Question marked as Best reply

Posted on Jul 26, 2012 9:46 AM

I have the same question, some things have improved which is great, but many things have been taken away which are crucial for us web developers. I'm having a tough time to have the styles even show at all, I click through the different web elements and the styles don't change. But my biggest problem is the drop down "New Style Rule" is gone. I used that all the time where it would automatically get the style of the current item and let you add new styles. Ugh!


I had to go to Firefox and actually was suprised how good their built in Web Inspector is now (no need for firebug). Apple please fix your web inspector, I enjoy using Safari and want to keep using it.

11 replies
Question marked as Best reply

Jul 26, 2012 9:46 AM in response to chadtheknife

I have the same question, some things have improved which is great, but many things have been taken away which are crucial for us web developers. I'm having a tough time to have the styles even show at all, I click through the different web elements and the styles don't change. But my biggest problem is the drop down "New Style Rule" is gone. I used that all the time where it would automatically get the style of the current item and let you add new styles. Ugh!


I had to go to Firefox and actually was suprised how good their built in Web Inspector is now (no need for firebug). Apple please fix your web inspector, I enjoy using Safari and want to keep using it.

Jul 26, 2012 10:17 AM in response to iJason_

Interesting - I never knew there was a "new style rule" drop-down.


Anyway, you don't need it. Just double-click in a blank part of the style area, and it will give you an empty line to fill in. That worked in Safari 5, and it still works in Safari 6. Or click in the last existing rule and type in a ";" at the end and it will give you new line.

Jul 26, 2012 10:28 AM in response to Joseph Delaney

Yes, double clicking is a common thing for adding a new style in the inspector, but the "Add New Style" drop down (it was on the top right of the styles sidebar) would automatically add the current elements class to the new style. So in other words if you had selected div class="myclass" it would automatically create a .myclass { item. It was very helpful and timesaving.

Jul 26, 2012 10:41 AM in response to chadtheknife

Line numbers: yes, you're right, they're gone. But you can click the little arrow and it takes you to the appropriate line in the CSS, with line numbers.


Page not loading: works for me, although I did have problems (right on this page) where the "reply" box wouldn't load until I closed the inspector - maybe it's just an issue with javascript changes to the DOM?

Jul 26, 2012 10:42 AM in response to chadtheknife

@chadtheknife


1) I'm not finding the line numbers either, but then again the styles aren't really working for me at all.

2) I'm not having this issue. New pages open fine for me.


We should probably keep this post about Safari Inspector, but your 3 finger swipe options can be changed in the trackpad system prefs. It may of gotten changed to 4 fingers. Just go in there and you can change how many finger swipes it takes to jump between spaces. Maybe start a new thread if you're still having issues.


I'm convinced that the web inspector for Safari 6 is just plain broken. I suppose I'll have to use Firefox for now.

Jul 30, 2012 11:32 PM in response to chadtheknife

Hey chadtheknife. I am having the same problems with the Inspector hanging Safari. I believe it thinks it's hitting a breakpoint... though, unfortunately it doesn't show the code where it hit the breakpoint.

So.


1. If you look on the bottom of the Inspector screen you should see the small debug icons. If you hit the "play" icon repeatedly, your page should show.


2. To stop this from happening again, click the little "Breakpoint" icon in the Inspector's top left toolbar (it looks like a right-arrow icon, just to the left of the console icon). That shows all the places that it has [automatically, it seems] set breakpoints. You can click the blue indicator on those places to disable those breakpoints and then it won't stop there waiting for your page to load.


Of course, even if that works for you, this is all messed up... you shouldn't have to do that. Furthermore, I can't figure out how to debug my own stuff at all... I can *sometimes* set a breakpoint, but then it hits the breakpoint and hangs as you describe, without loading my source for me to see!

Also, if what I'm debugging is an exception in my own code (e.g. NPE) I can't even select code in the responsible .js file because when I choose that .js file from the Inspector's "Resources" list, it just shows a big red error text with the exception error, but doesn't show the file's contents!


I don't know, maybe I'm doing something wrong. If so, it's very unintuitive. Meanwhile, I'm dead in the water and cannot debug.

Safari Code Inspector in Mountain Lion - where are my needed features?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.