Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Skip line while debugging in Chrome developer tools

Is there a feature in Google Chrome developer tools that would allow skipping a line without it being executed while debugging, in a similar way that it can be done in Visual Studio?

One workaround I can think of is 'live editing' the code by wrapping the line in

if(false){ //line to be skipped } 

But this is not the most convenient workaround that I would have to do after every refresh. Is there a built-in or faster, better way of doing this?

like image 585
Matas Vaitkevicius Avatar asked Jun 10 '14 10:06

Matas Vaitkevicius


People also ask

How do I skip a line in Chrome Debugger?

JavaScript breakpoints When debugging JavaScript it is sometimes useful to set breakpoints. You can set breakpoints in Chrome DevTools by clicking on the line number you want to break at then press Cmd + R ( Ctrl + R ) to refresh the page. The page will then run right to that breakpoint.

How do I go to the next line in debugging?

You can click the Debug | Step Over menu or press the keyboard shortcut F10 to execute the current line and jump into the next line for execution.


1 Answers

No, and is not going to happen.

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.

like image 141
Matas Vaitkevicius Avatar answered Sep 19 '22 14:09

Matas Vaitkevicius