Interactive Debugging of WebGL applications

The WebGL Inspector provides an interactive set of tools for debugging and diagnosing advanced WebGL applications. It provides the ability to capture entire frames' rendering calls and interactively step through them, an annotated call log with stepping/resource navigation and redundant call warnings, resource browsers for textures, buffers, and programs, and much more.

Programmatically Debugging WebGL applications

WebGL's error reporting mechanism involves calling getError and checking for errors. As it can be burdensome to put a getError call after every WebGL function call here is small library to help with make this easier.

See a sample of the above techniques

Printing Errors and other constants

WebGL uses many constants and returns errors as numbers. It's often easier to display those numbers as strings. With that in mind you can call WebGLDebugUtils.glEnumToString to convert a WebGL constant to a string.