This is one of my pet issues w/ Chrome debugger. I have a function that calls 3rd-party library that internally calls 20 other functions and the 20th library function again calls another function in my library.
MyFunctionA()
-> calls libFunctionA()
-> calls libFunctionB()
...
-> calls libFunctionZ()
->calls MyFunctionB() {debugger;}
If I put a debugger in MyFunctionB, I see stack trace like below:
I want to hide all the libFunctions(X,Y, Z etc..) so I can easily see only my libraries functions in the stack like below:
Is there any way to do this in either Chrome or Firefox debuggers?
View the Call Stack To view the call stack, open DevTools Sources panel and on the right panel, expand the Call Stack panel to see all the current functions in the call stack.
Right-/Ctrl- clicking in the call stack pane opens a context menu with the following items: Restart frame restarts execution at the beginning of the current frame.
# Step over line of code to execute the function without stepping into it. You're paused on A . By pressing Step over, DevTools executes all the code in the function that you're stepping over, which is B and C .
you can blacklist those scripts which you dont want to see.
steps:
Method 1:
Method 2: you can blackbox complete folder or files in settings > Blackboxing, using a pattern
Next time: When paused on a breakpoint, in the call stack you will see a message stating the number of frames which are blackboxed. You can show these frames if you want, but since they are calls made from a blackboxed script they are hidden unless you click show.
You can hide all the non-relevant stack trace lines in Chrome + Webpack by adding
webpack:///./node_modules
To the list of blacklisted source in Chrome Dev Tools Settings.
This is what the traces look like after:
Special thanks to other posters @Shishir Arora + @str
Mozilla just announced that this feature was built into Firefox 58 Developer Edition. This most likely means that it also will be available in Firefox 58.
Similarly, the debugger can recognize two dozen common JavaScript libraries and group their stack frames in the call stack. This makes it easy to separate the code you wrote from code provided by a framework when you’re tracking down a bug:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With