Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the Handled filter in Chrome DevTools used for?

Chrome DevTools has several useful filters to limit the logging: Errors, Warnings, Info etc.

The last filter is called Handled, and I have yet to find out what that is used for. The is no console.handle() or similar. Googling hasn't provided an answer.

For what and how do I use the Handled filter?

like image 200
marlar Avatar asked Oct 30 '15 22:10

marlar


People also ask

How do I use Chrome filters?

Simply navigate to any website you want to filter and block, click the extension icon and click the big Block Site button. This will add the website to your block list, and you'll no longer be able to access it. You can also type the URL of the website into the extension directly to block it in the same way.

How do I filter in dev tools?

Click the settings button in DevTools. Select the "Components" tab. Click on the toggle to the left of the "host" type filter to disable it.

How do I clear my Chrome filters?

Delete a filterHover the cursor over the filter you want to delete. Select Open menu. . Select Delete and Confirm.

How to use the filter tool in DevTools?

The filter tool is located inside the Network panel in DevTools. With our keyboard shortcuts, DevTools will open directly into the Elements tab. In that case, we’ll switch to the Network tab, where we’ll have access to the filter tool like so: HTTP requests are generated by the activities that happen on the browser.

What is Chrome DevTools and how does it work?

Chrome DevTools is a set of web developer tools built directly into the Google Chrome browser.

How do I hide the filter pane in DevTools?

By default, DevTools shows the Filters pane. Click Filter to hide it. Figure 36. Hide Filters, outlined in blue Use large rows when you want more whitespace in your network requests table. Some columns also provide a little more information when using large rows.

How to filter HTTP requests in DevTools?

With our keyboard shortcuts, DevTools will open directly into the Elements tab. In that case, we’ll switch to the Network tab, where we’ll have access to the filter tool like so: HTTP requests are generated by the activities that happen on the browser.


1 Answers

This filter is for exceptions handled inside of a promise. The filter was added to the UI with this patch. Included test and linked ticket reveal what this feature is all about.


If we create a promise and reject it like so:

var p = new Promise((resolve, reject) => reject('ooops'))

error message will be immediately printed to the console:

uncaught error in promise

However, rejection can be handled later on:

p.catch(e => {})

causing previous error message to change state:

handled error

"Uncaught (in promise) ooops" becomes a "handled promise rejection". Since it's not considered an error anymore it will not show up when the "Errors" filter is active. It will show up though, when the new "Handled" filter is active.

revoked error not visible when "errors" filter is active

revoked error visible when "Handled" filter is active

like image 147
Konrad Dzwinel Avatar answered Oct 19 '22 11:10

Konrad Dzwinel