Advertisement

#line directive in HLSL and debugging

Started by October 22, 2018 06:56 PM
0 comments, last by simco50 6 years, 3 months ago

Hello,

I recently found out about the "#line" directive in HLSL.
Because I handle #include's manually, the line numbers in shader compilation errors are incorrect and dynamically adding these "#line" directives while loading the shader solves this problem which saves me a lot of time as I know precisely where to look when I make an error.
However I noticed when I enable this, I can no longer debug shaders using Visual Studio Graphics Debugger.
f I want to debug eg. the vertex shader, it asks me for the source file (while the right source file is there in the background! See the image).
Screenshot_1.thumb.jpg.8e2626bea745ee75707fcc1cbc8f4443.jpg
is there some kind of bug with Visual Studio or is this just an annoying side-effect from using "#line"?
Anyone has experience with this?

Cheers!

This topic is closed to new replies.

Advertisement