console.snapshot

687474703a2f2f692e696d6775722e636f6d2f6531455575684d2e706e67

Output snapshots and screenshots of canvas elements directly in the console of the Chrome Dev Tools

var canvas = document.createElement("canvas"),
ctx = canvas.getContext("2d");

// ...
//draw
// ...

console.screenshot(canvas, 0.8); //Snapshot it and scale the output to 80% of the original size

Resulting output is the image picture above. Also supports creating a snapshot which outputs the canvas context call stack and state changes to the console.

console.snapshot →

Published by Bramus!

Bramus is a Freelance Web Developer from Belgium. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.