Search code examples
html5-canvasgoogle-chrome-devtoolsjavascript-debugger

Debug JS modifying some specific canvas element


I'm trying to debug a canvas element with Chrome Developer Tools.
From this:
How to inspect Canvas Frames
I can see there was an experimental feature to do something like that but was removed.

Is there a way to search/find the JS code responsible of modifying some specifig canvas element? in that way at least we could add breakpoints to the JS


Solution

  • I've found a workaround: override the function from CanvasRenderingContext2D and add a "debugger;" line there to stop every time is called (or add some extra condition to stop)