Register for this year’s #ChromeDevSummit happening on Nov. 11-12 in San Francisco to learn about the latest features and tools coming to the Web. Request an invite on the Chrome Dev Summit 2019 website

Set a breakpoint based on a certain condition

Set a breakpoint based on a certain condition

When you set a breakpoint, you can make it conditional based on the result of an expression. Right click on the line gutter and select Add Conditional Breakpoint and enter your expression.

If you have a callback like:

function callback(result, err) {
    //set a conditional breakpoint based on the existence of err
}

You could set a conditional breakpoint based on the existence of err.