# Is it possible to debug shaders in GLSL level instead of assembly language level?

I'm writing some Vulkan code and write my shaders in GLSL.

I tried to use Renderdoc to debug my shaders, but I only got disassembly code.

Is it possible to debug shaders at the level of GLSL if I have the source code of the shaders in GLSL format?

You can use the OpSource SPIR-V instruction to include the source language text in the shader module, at which point the Source Unavailable button becomes a clickable Debug in Source button, but at this point it just doesn't (and isn't supposed to) work; stepping seems to jump all over the place.
Though it might be worth mentioning that including the source language text with OpSource enables you to use RenderDoc's shader editing feature which allows you to directly edit the GLSL code and immediately see the result in the texture viewer. (Use glslang::TIntermediate::addSourceText if you're compiling with glslang.)