title: How do you guys debug GLSL?
body: <p>I recently attempted to write some GLSL shader code and did not have much luck when the shader didn't draw what I expected (basically, everything is black on screen). Here are the tools I tried:</p>
  
  <ol>
  <li><p>Nvidia NSight VS integration - It crashes right away when I start the application, try couples other application even with the simple triangle drawing and still have no luck. Search through the internet and Nvidia forum and seem it is a common issue, and didn't seems to find any solution. </p></li>
  <li><p>glslDevil - It can start the application but then the program keeps exiting before any rendering happens, the GL Trace is</p>
  
  <pre><code>wglMakeCurrent(0, 0)
  wglDeleteContext(00010000)
  ChildProcess exited
  </code></pre>
  
  <p>Get another crash when running another application when after calling
  glDeleteTexture(1, 0314EF74)
  Child process exited</p>
  
  <p>I have no clue what is going on. </p></li>
  <li><p>AMD PerfStudio 2 - It seems it is the most promising tools, successfully run my application and display the required information. However, it didn't seems support debugging GLSL, I cannot step through the shader and watching the local variables etc? It seems only support DirextX shader</p></li>
  <li><p>gDebugger - It works pretty well tool, similar to AMD PerfStudio, but again it is not a debugger, cannot step through the shader code and watching any local variables. </p></li>
  <li><p>Printf - ?? Someone on stack overflow saying using printf, how can I do printf() in the shader? </p></li>
  <li><p>Convert DirectX shader to GLSL - Since DirectX shader have better debugging tool, and there are tools like <a href="http://sourceforge.net/projects/hlsl2glsl/" rel="nofollow noreferrer">http://sourceforge.net/projects/hlsl2glsl/</a> to automatically convert the hlsl to glsl, it seems it can be an alternative. I personally didn't like this solution, and really wish I have another choice.</p></li>
  </ol>
  
  <p>Can anyone suggest how you debug your GLSL? What tool you are using successfully?</p>
  
  <p>I am running on:</p>
  
  <ul>
  <li>NVidia GFX 460v2</li>
  <li>Visual Studio 2008 and 2010</li>
  <li>GLEW</li>
  <li>OpenGL 2.0</li>
  </ul>