JavaScript newbie here. I'm reviewing a big swath of JS code using devtools and I'm wondering if there's an easy way to locate where the closing bracket is on a function. Is there a feature where I can highlight an opening bracket and pinpoint where the closing bracket is located?
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.
You can use a chrome devtool shortcut. First move the cursor next to opening or closing bracket then do CTRL + m. Note this also works for parenthesis and curly brackets.
To see all the available shortcuts click on three dots icon at the top right side of devtools then click on Shortcuts
.
You should use the sources tab.
It has few buttons in the footbar, which has pretty print which looks like this:
{}
which displays the formatted JS. When you put your cursor on a brace the other (closing or opening ) brace is automatically matched for you.
For latest devtools in chrome, use chrome canary.
refer > https://developers.google.com/chrome-developer-tools/docs/javascript-debugging
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