Live data from Hacker News

Things I didn’t know about the WebKit inspector

blog.joocode.com

21–30 of 54 posts

Re: Things I didn’t know about the WebKit inspector

#22
post #17

very useful, but i really wish Chrome allowed you to replay a HTTP request from the network tab. I just want to right click on e.g a POST request, and send it off to the server again. Whenever i need to do this at the moment i have to switch to LiveHttpHeaders in firefox, which is a pain.

why not use firebug for that in firefox?

Re: Things I didn’t know about the WebKit inspector

#23

Can anyone point to a guide for using the web inspector in Safari 6? It looks like it could be powerful, but it is not as user-friendly as the Safari 5 and Chrome inspectors. It feels like a step back.

Apple's documentation has been updated for Safari 6's new Web Inspector: http://developer.apple.com/library/safari/#documentation/app...

Re: Things I didn’t know about the WebKit inspector

#24

The $0 thing will save me a lot of time. I often spend a while figuring out how to select a specific element with DOM queries, or assign it a special ID and then do the whole document.getElementById malarkey.

This blew my mind! I've always thought there should be a way to do this, and now to learn that there always has been!

Re: Things I didn’t know about the WebKit inspector

#25
post #17

very useful, but i really wish Chrome allowed you to replay a HTTP request from the network tab. I just want to right click on e.g a POST request, and send it off to the server again. Whenever i need to do this at the moment i have to switch to LiveHttpHeaders in firefox, which is a pain.

why not use firebug for that in firefox?

i use chrome as my default browser, it's just a pain to have to switch for this kind of thing.

Re: Things I didn’t know about the WebKit inspector

#26
post #18

Speaking of web inspectors, did anyone else notice what a tremendous broken piece of crap the one in the latest version of Safari is? It's downright scandalous! I had to manually roll back Safari to 5.1.7 to get the old one back. I will give Apple credit for keeping me hooked on Safari since they're bookmark and history sync across all their devices via the cloud is top notch.

I gave it a cursory glance but haven't had much cause to really use it yet (though I did get some good use out of the console keeping a history of log files). What kind of issues have you been having?

Half the features missing, impossible to navigate.

Re: Things I didn’t know about the WebKit inspector

#27
post #21

It's a long shot, but worth a try: I loved using Safari's inspector for for trying out CSS selectors. It seems that both for Chrome and Safari, only searching for xpath seems to still work. Am I missing something or did that really get removed?

How did you "try out CSS selectors"? $$ is supposed to do that (it's essentially a shortcut to document.querySelectorAll), does that not work anymore in recent versions?

Re: Things I didn’t know about the WebKit inspector

#28
post #25

Earlier quoted context omitted.

why not use firebug for that in firefox?

i use chrome as my default browser, it's just a pain to have to switch for this kind of thing.

if you're switching to firefox for livehttpheaders, switch for firebug. ???

Re: Things I didn’t know about the WebKit inspector

#29

I love tip articles! Here are some more that I use heavily (note that some of these might be Google Chrome only at the moment) The gear in the bottom right of the Chrome inspector has a lot of useful options, such as emulating touch events and preserving the console log upon navigation. The Watch Expressions persist across tabs and I keep "this" as the top watch expression all the time. It makes for an easy quick che…

> There's a useful shorthand: In the console you don't have to type "document.getElementById('blah')" to get a reference to the blah ID'd element. Instead you can just type "blah" in the console, and even though autocomplete doesn't show it, pressing enter will return the element with ID blah!

That's crappy, it's DOM0 aliasing. Use `$` if you're not using jQuery, it's an alias for document.getElementById. And there's $$ for document.querySelectorAll and $x for xpath queries.

See http://getfirebug.com/wiki/index.php/Command_Line_API for the rest of the command-line API.

> The Watch Expressions persist across tabs and I keep "this" as the top watch expression all the time. It makes for an easy quick check when debugging to make sure that you're in the scope you thought you were, and you can always use the dropdown to inspect all the properties of the current class.

An other good introspection method when debugging: expressions entered in the console execute in the current scope.

Re: Things I didn’t know about the WebKit inspector

#30
post #21

It's a long shot, but worth a try: I loved using Safari's inspector for for trying out CSS selectors. It seems that both for Chrome and Safari, only searching for xpath seems to still work. Am I missing something or did that really get removed?

How did you "try out CSS selectors"? $$ is supposed to do that (it's essentially a shortcut to document.querySelectorAll), does that not work anymore in recent versions?

You could just enter the selector in the top right search box in the elements tab.

I just noticed that Chrom seems to have updated, it works again: https://skitch.com/marc.seeger/em6tu/hacker-news-add-comment

Post reply on HN