Quantcast
Channel: Debugging – The Wiert Corner – irregular stream of stuff
Viewing all articles
Browse latest Browse all 40

Skip line while debugging in Chrome developer tools – Stack Overflow

$
0
0

[Wayback/Archive] Skip line while debugging in Chrome developer tools – Stack Overflow (thanks [Wayback/Archive] Matas Vaitkevicius for both asking and answering):

Last comment from dev says:
We’re going to hold off on this feature for now. It’s complexity is high and it’s not common enough a workflow. One could also just comment out the lines and hit ctrl-s to get the same effect, pretty much. Status: WontFix –
The workaround is to comment out the line you want to skip and press Ctrl+S.

The problem is that the workaround fails when you have used the Chrome Dev Tools to format the source code: then you cannot edit the formatted code.

The workaround for that is cumbersome, but doable as in this bug report:

[Wayback/Archive] 341848 – Devtools: format source & allow editing afterwards – chromium

Steps to reproduce the problem:
This is more of a feature request. Currently when I’m developing in Chrome DevTools in order to format the code I have to do:

1. Open a javascript file in the sources panel
2. Click on pretty print
3. Select the pretty printed/formatted code with CTRL-A
4. Click again on the pretty printed button to disable it
5. Select all text with CTRL-A and replace it with pasting with CTRL-V (the replaced code comes from the clipboard and is pretty printed).

What is the expected behavior?
I’d like to do the above steps only in one command (either a button “Format and save” or with a shortcut or both).

What went wrong?
It takes 2 clicks and 3 keyboard presses to simply format the code when it could’ve been done in 1 click/1 keyboard press.

–jeroen


Viewing all articles
Browse latest Browse all 40

Trending Articles