Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome dev tools, Keep "Step Over Next Function Call" on a single file

Is there any way to keep the chrome dev tools breakpoints into a single source file? I keep running into this issue every now and then, where I set up a breakpoint and continue to the next function calls, problem is the javascript is sometimes relying heavily on other libraries so I just keep jumping from file to file, and it takes a long time to get back to the original file that I originally wanted to debug. So the ideal scenario would be clicking on "Next Function Call" but only break if it's in the same source file, and skip all other files.

Can this be done?

like image 661
StackOverMySoul Avatar asked Feb 07 '17 16:02

StackOverMySoul


1 Answers

You can blackbox certain scripts from being accessed in the debugger. They will still run, but the debugger won't step into these files.

You can do this by right-clicking on the file, either in the file tree, or the source code area in an open file, and clicking 'Blackbox script'

Blackbox

Source: Blackbox JavaScript Source Files

You can also blackbox scripts from the Call Stack pane on the Sources panel.

blackbox from Call Stack pane

If you have a requirement to skip a certain line or lines in a script, you can use the Never pause here option from the context menu.

Never pause here

Source: Chrome DevTools: Never Pause Here

like image 74
Gideon Pyzer Avatar answered Nov 04 '22 02:11

Gideon Pyzer