Search code examples
debuggingpolymerpaper-elements

Debugging polymer paper-elements


I am new to Polymer and I wondering if you can do the same thing we do with Ng1 and Ng2. For debugging Ng1 you select the element in the DOM and do a $scope in the console and for Ng2 ng.prob($0). Is there an equivalent for Polymer and more precisely for the paper-elements ? I would like to see the actual javascript representation of the webcomponent in the console like we do in Angluars. Currently all I see is the DOM node selected with $0 in the console. Thanks


Solution

  • In Chrome you can use console.dir($0) to display the Javascript representation of the selected DOM node, other browsers might have similar functionality.

    https://developer.chrome.com/devtools/docs/console-api#consoledirobject