---
title: "WEBGL_debug_shaders | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface WEBGL\_debug\_shaders

The **`WEBGL_debug_shaders`** extension is part of the WebGL API and exposes a method to debug shaders from privileged contexts.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_debug_shaders)

interface WEBGL\_debug\_shaders {  
    [getTranslatedShaderSource](#gettranslatedshadersource-1)(shader: [WebGLShader](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.WebGLShader/)): string;  
}

##### Index

### Methods[](#methods)

[getTranslatedShaderSource](#gettranslatedshadersource)

## Methods[](#methods-1)

### getTranslatedShaderSource[](#gettranslatedshadersource)

-   getTranslatedShaderSource(shader: [WebGLShader](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.WebGLShader/)): string[](#gettranslatedshadersource-1)
    
    The **`WEBGL_debug_shaders.getTranslatedShaderSource()`** method is part of the WebGL API and allows you to debug a translated shader.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_debug_shaders/getTranslatedShaderSource)
    
    #### Parameters
    
    -   shader: [WebGLShader](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.WebGLShader/)
    
    #### Returns string
