error.js#reportError.Related to #6199.
/cc @kul3r4
Is this currently integrated with "element level" exceptions that highlight elements that have a problem. E.g. if an expression associated with them has an exception?
Hmm, not sure which exceptions you're referring to.
Currently, on page load:
user().error on expression parse failure or invalid bindinguser().error when initial state != expression resultTODO:
#log=4, dev().fine on data flow steps to aid in bug reportingI meant this code pass: https://github.com/ampproject/amphtml/blob/master/src/error.js#L104
Ah, no it doesn't; added to list above. Thanks for the reference.
@choumx What is the solution for developer when debugging amp-bind variables?
Would be great to have a way to dump the global state in the console. We could then later wrap it in a Chrome DevTools Extension.
@kul3r4 You can create elements with [text] bindings to the expression you want to debug, e.g.
<p [text]="myState.foo + 123">Debug here</p>
I think that may be more convenient than repeatedly running "print expression" commands in dev console. Let me know if that doesn't work for you.
@cramforce Good idea, will track this in the next sprint.
I understand I can use [text] bindings but this requires to redeploy a new version of the page just for debugging. Interested in a way of dumping the global state in the console and use it in a Chrome DevTools Extension
Most helpful comment
Would be great to have a way to dump the global state in the console. We could then later wrap it in a Chrome DevTools Extension.