# Debugging Shaders

We may have bugs in our shader programs.

During the running, the main C++ program will compile our shader programs and report error.

Don't panic when you see your program stops and reports erros about shaders.

For example:

<figure><img src="https://3464970502-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JUKGJZ67JX02QZdPhsy%2Fuploads%2FGCn4vk60ELQyNS1eTGKq%2Fb5e837fe-01eb-4f77-9ecc-3d9ff3ebaac0.png?alt=media&#x26;token=5ade0c40-db86-4bdf-8577-710a5d37d835" alt=""><figcaption></figcaption></figure>

And this:

<figure><img src="https://3464970502-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JUKGJZ67JX02QZdPhsy%2Fuploads%2Ff7vfXdXlubxJC3r456o5%2F86a5a9c0-6e5f-468a-8fa8-8e826e4b0f51.png?alt=media&#x26;token=10f1bee7-e0a8-440e-a257-bdab64178a01" alt=""><figcaption></figcaption></figure>

The shader compiler will tell you the location (the line number and offset) of the error with a description.

Try to use the description as a reference to fix your bug.
