O'Reilly logo

AMP: Building Accelerated Mobile Pages by Ruadhan O'Donoghue

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Debugging state with AMP.printState()

You can output the current state to the developer console at any time. This can be useful in debugging an AMP page. To do this, type AMP.printState() into the developer console when in development mode (that is, with #development=1 appended to the page URL):

Displaying AMP state in the browser developer console with AMP.printState()

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required