WEBGL_debug_shaders WebGL extensionBaseline · Widely available
The WEBGL_debug_shaders extension for WebGL 1.0 and 2.0 contexts adds the getTranslatedShaderSource() method to debug shaders from privileged contexts.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Sep 16, 2020. Widely available since Mar 16, 2023.
Browser support
DesktopChrome
1–46Not supported
47+Supportedsince Dec 1, 2015
Current: 155Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154Firefox
1–55Not supported
56+Supportedsince Sep 28, 2017
Current: 157Safari
1–13.1Not supported
14+Supportedsince Sep 16, 2020
Current: 27MobileChrome Android
18–46Not supported
47+Supportedsince Dec 2, 2015
Current: 155Firefox Android
4–55Not supported
56+Supportedsince Sep 28, 2017
Current: 157Safari iOS
1–13.4Not supported
14+Supportedsince Sep 16, 2020
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: WEBGL debug shaders.
Feature detection
JS · check before using
if ("WEBGL_debug_shaders" in globalThis) {
// WEBGL_debug_shaders is available
} else {
// load a polyfill or use a fallback
}Documentation (MDN)
Sub-features
Support for each part of the feature (2). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| WEBGL_debug_shaders | 47 | 79 | 56 | 14 | 47 | 56 | 14 |
| WEBGL_debug_shaders.getTranslatedShaderSource | 47 | 79 | 56 | 14 | 47 | 56 | 14 |