Jump to content
  • Advertisement
Sign in to follow this  
doctorsixstring

Shader Debugger Issue

This topic is 4836 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm having a hard time getting Visual Studio's Direct3D debugger working with my shaders. I've spent the last hour or two looking at the MSDN articles Getting Started Debugging Shaders and Shader Debugging Tutorial. My app builds fine, and runs wonderfully. Unfortunately, running from "Debug->Direct3D->Start With Direct3D Debugging" fails to do anything beyond rebuilding my project (application is not launched). No error messages appear, so I have no idea what the issue might be. Has anyone experienced anything like this? I'm using Managed DirectX, C#, Visual Studio .NET 2003, and a fresh install of the DX9 August 2005 SDK.

Share this post


Link to post
Share on other sites
Advertisement
Can you put a breakpoint on the first line of 'main' to make sure that you're actually debugging? Make sure you can step through your regular source code first.

Make sure you compile your shaders with debug information and use the reference rasterizer if you're trying to debug pixel shaders.

neneboricua

Share this post


Link to post
Share on other sites
Quote:
Original post by neneboricua19
Can you put a breakpoint on the first line of 'main' to make sure that you're actually debugging?

In my C# code, or in the shader? Debugging works fine in the main app.

Quote:
Original post by neneboricua19
Make sure you compile your shaders with debug information...


By specifying ShaderFlags.Debug in my call to Effect.FromFile(...), right?

Quote:
Original post by neneboricua19
...and use the reference rasterizer if you're trying to debug pixel shaders.


Not specifying a pixel shader in my technique means no pixel shader will be used, right?

My test shader:

float4x4 WorldViewProj;

// Transform our coordinates into world space
void Transform(
inout float4 Pos : POSITION,
out float4 Diffuse : COLOR0 )
{
Diffuse.rgba = 1.0f;
Pos = mul(Pos, WorldViewProj);
}

technique TransformDiffuse
{
pass P0
{
// shaders
VertexShader = compile vs_2_0 Transform(); }
}



Share this post


Link to post
Share on other sites
Quote:
Original post by doctorsixstring
I'm having a hard time getting Visual Studio's Direct3D debugger working with my shaders. I've spent the last hour or two looking at the MSDN articles Getting Started Debugging Shaders and Shader Debugging Tutorial. My app builds fine, and runs wonderfully. Unfortunately, running from "Debug->Direct3D->Start With Direct3D Debugging" fails to do anything beyond rebuilding my project (application is not launched). No error messages appear, so I have no idea what the issue might be. Has anyone experienced anything like this?

I'm using Managed DirectX, C#, Visual Studio .NET 2003, and a fresh install of the DX9 August 2005 SDK.



"Start Direct3D Debugging" doesn't work with Managed DirectX commands (this is a known bug). Instead run the application (without debugging) and then attach to the process to get access to the Direct3D debugging extensions.

Share this post


Link to post
Share on other sites
Does anyone happen to know if there is any way to debug Direct3D apps in Visual C# 2005 Express Edition? There is no "Start Direct3D debugging" option in Debug menu, nor "Attach to process". I've tried running with Direct3D debug output enabled and debugging normally, but D3D debug messages don't show in the debugger.
I'm using August 2005 SDK.
Any help would be appreciated. [smile]

Share this post


Link to post
Share on other sites
Quote:
Original post by centipede
Does anyone happen to know if there is any way to debug Direct3D apps in Visual C# 2005 Express Edition? There is no "Start Direct3D debugging" option in Debug menu, nor "Attach to process". I've tried running with Direct3D debug output enabled and debugging normally, but D3D debug messages don't show in the debugger.
I'm using August 2005 SDK.
Any help would be appreciated. [smile]

Haven't tried it, but in 2003 you had to enable unmanaged debugging to get the debug output (in 2003 it was in Project->Properties->Configuration Settings->Debugging)

Share this post


Link to post
Share on other sites
Quote:
Original post by Coder
Haven't tried it, but in 2003 you had to enable unmanaged debugging to get the debug output (in 2003 it was in Project->Properties->Configuration Settings->Debugging)

Hmm, there's no such settings in 2005. Thanks for the tip anyway, I'll keep trying to figure this out.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!