I wonder — does Chrome development tools support something like Ruby inspect
or Objective C description
methods to print some meaningful string instead of just showing the object constructor name when you explore the objects in the console.
So in that case — instead of showing "Crossing, Crossing, Crossing, ..." it would show some custom string for each object (generated by a method of that object).
ps. I know that there is a console.table
method which can produce some nice output, but it still would be nice to have a more universal object formatting.
One of the easiest ways to inspect a specific web element in Chrome is to simply right-click on that particular element and select the Inspect option. Clicking on the Inspect option from the right-click menu will directly open the Developer tools including the editor, Console, Sources, and other tools.
Right-click anywhere on the page and choose Inspect Element, or you can use the keyboard shortcut Command+Option+I.
The name of the feature you are looking for is custom formatters
Basically you must enable the feature in Chrome and make that during the start process of your script, you write your formatters into the magic global var window.devtoolsFormatters
The official doc:
https://docs.google.com/document/d/1FTascZXT9cxfetuPRT2eXPQKXui4nWFivUnS_335T3U/preview
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