How To Enable Canvas Profiling in Chrome Dev Tools

At this year’s Google I/O, Paul Irish demoed Canvas Profiling in Chrome. This feature recently graduated from Canary into Google Chrome so here’s how to enable it.

1. Firstly open Chrome and type chrome://flags into the omnibox. You’ll see a page that looks like this:

canvas_profiling_1
2. Scroll down until you find ‘Enable Developer Tools Experiments’. Check this box then click the button at the bottom of the page to restart Chrome.

canvas_profiling_2
3. Next go to any page that has WebGL content and bring up the Dev tools.

4. Click the Settings cog in the bottom right hand corner.

5. Click on Experiments and enable ‘Canvas Inspection’.

canvas_profiling_3
6. Close Settings and click on the Profiles Tab. You should now have a new option: ‘Capture Canvas Frame’. You may need to reload your page to enable it.

canvas_profiling_4

7. Click on it and you’ll see captured Draw Calls appear in the tools window. Turn down the twisty to see the contents of each call. Click through the location links to jump into the source.

canvas_profiling_6

canvas_profiling_7