39 comments

[ 1.8 ms ] story [ 79.0 ms ] thread
I see myself using the Block-level code coverage quite often.
Could be used to generate automated code coverage in headless mode?
Ah, didn't even think of that, would be awesome!
CMD+Shift+4 has always allowed you to take screenshots of any parts of your screen, (including your devtools), so curious why this is a feature in Chrome? Unless it's meant for Windows maybe where it's harder to take screenshots?
You can hit printscreen in windows to take screenshots (1 key instead of 3, even easier than mac).

I could imagine it would be useful in remote debugging sessions (such as when inspecting android webviews over USB).

Those are two totally different things. Windows take a screenshot of everything visible. Cmd+shift+4 on a Mac allows to select a region to save as a screenshot. Finally, if you are on Mac, this update provides node level acreenshot, allowing you to save an image of a HTML node with just one click, no need to drag the cursor. This is especially useful if the node takes more space than the viewport since before you had to stitch screenshots together.
Agreeing on 100% of that. Just wanted to point out taking screenshots in windows isn't "harder". (You can also alt-prtscr for just the active window, or use the snipping tool to screenshot a region).
> Windows take a screenshot of everything visible.

For the record, it's still not a region selector but there is also alt + printscreen to take only the visible windows.

Don't you still have to open Paint, press paste, hit save, and choose where to save the screenshot?

For the record, cmd+shift+3 takes a screenshot and immediately saves it to your desktop on macOS.

Yes, and Dropbox (& others might too) offers to listen to PrtScr and save in Dropbox/Screenshots as image automatically, without using paint or anything.
Actually, the equivalent on Windows that was added on Windows 10 Creators update is winkey + shift + s.
I imagine this will be useful for taking screenshots of arbitrary elements via the headless mode.

Anyway, why would it be harder to take screenshots in Windows? Have they restricted the Win32 API recently (I haven't kept tabs)?

I think he is referring to how on windows you can only screenshot the entire screen. Not sure if that has changed in recent years.
You can also screenshot the current window (Alt-PrtSc).

Since Vista, there is also snipping tool, which allows the same things as Mac screenshoting.

Win-Shift-S to select a rectangular area to capture
You can totally screenshot anything anyway you like on windows. The only difference is that windows has separate utility for this instead of a shortkey
this is the only thing preventing CasperJS / PhantomCSS from supporting Puppeteer, I think. will be cool to see this go in.
It's nice to have a uniform way across all operating systems, but more important than that, being able to take screenshot of specific elements makes it much nicer than you having to crop the image manually or try to get the perfect snipped screenshot. I assume this also handles screenshots that are larger than your display, which would be very hard with OS screen grab for elements that can't fit in a single screen.
They still haven't reverted the dropdown filtering UI for the console, the old style quick access toolbar, like the network panel. It used to be really useful, yet since the change, I barely use it anymore.

There's a long thread about it here, but the chrome developers haven't really engaged with the community feedback

https://groups.google.com/forum/#!topic/google-chrome-develo...

The dev tools console has also become a dumping ground for repeated browser warnings and the option to turn them off isn't even persistent.

Starting to think maybe it would be good to have a "DevTools" lite, now that there are literally dozens of tabs and pages. Is there a shortcut to just bring up the console?
> Is there a shortcut to just bring up the console?

I think it depends on the last feature used, but F12 does that for me. You can also try ctrl+shift+i (opt+cmd+i on Mac, I think?)

ctrl+shift+j goes directly to console.

I believe ctrl+shift+i goes to whatever tab you were at last, and ctrl+shift+c goes to the element tab and enables the element selector.

I don't know if there's any other shortcuts but these are the one I use most often. You can also drag the various tabs to order them the way you like.

Correct, Control+Shift+J (Windows, Linux) or Command+Option+J (Mac) opens DevTools and focuses the Console panel.
With DevTools open, Escape brings up the console.
Cool but I really wish they'd add more keyboard shortcuts. Like ability to use arrows and keyboard to select a network request and replay it. Or to drill down a deeply nested json without having to make a series of precise mouse clicks
I actually prefer the Firefox dev tools these days. One thing that I really like is the edit and resend functionality[0]. Quite useful when quickly testing API calls. I know you can use other tools in Chrome to do the same, but I like that it’s built in. Good to see improvements in the Chrome dev tools nonetheless!

[0] https://developer.mozilla.org/en-US/docs/Tools/Network_Monit...

I like Firefox too, but chrome still displays JSON objects in the console very nicely. I haven't found a good way to do this in FF yet. Do you know of a way?
IDK man, afaik there's no way to prettify API responses in a Response tab.
If it is a GET request, just open it in a new tab. Firefox has a built-in json viewer (no extensions required).

Eg. open this in a new tab: http://httpbin.org/get

Hey fellow HN'ers, I recently discovered you can select source in this (windows) terminal-like fashion by holding alt (i.e. https://imgur.com/a/XnCSd).

Does anyone know what is the purpose of this feature? I always disliked how difficult is to select something on windows cmd, this seems like anti-feature for me, but obviously I am missing something.

I've seen people use the same shortcut in sublime text to copy small code blocks (without copying the indentation).
many text editors have that feature, while might be not that widely used or useful, it's still ported and implemented in many of them
column mode, very useful
I continuously struggle with debugging aspx with embedded JavaScript. Breakpoints can't be set on any line and I still haven't figured out the logic why and when stepping through the highlighted line is never the one that is actually running. Even after expanding the code with the { } button. It's just simple JS so no code maps should be needed.