Archived

This topic is now archived and is closed to further replies.

Shader breakpoints

This topic is 5148 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 can't use breakpoints in my shaders. Question marks appear in the breakpoint dots when I start the debugger, and when I move the mouse cursor over them it says "The breakpoint will not currently be hit. No executable code is currently loaded at this location." How can I convince the debugger that there is executable code? I have enabled shader debugging in the control panel, assembled the shader with D3DXSHADER_DEBUG | D3DXSHADER_SKIPOPTIMIZATION, I create the device with software vertex processing and have also tried the ref device and I use the Direct3d debugger in vs.net (Debug->Direct3D->StartD3D). Any suggestions? I really would appreciate it. [edited by - Zook on November 8, 2003 12:02:43 PM]

Share this post


Link to post
Share on other sites
I think if you want to debug Shaders you have to do it in software because of the way they work. So try putting your program in software mode, and debugging.

-=Lohrno

Share this post


Link to post
Share on other sites
I think you actually have to use a Software device instead of HAL, not just software vertex processing. Like when you create your device, try putting D3DDEVTYPE_REF for the device type.

-=Lohrno

[edited by - Lohrno on November 8, 2003 12:16:17 PM]

Share this post


Link to post
Share on other sites
Tried that too (I mentioned the "ref device" in the original post), although it should work with at least the vertex shaders with hal according to the sdk doc.

Share this post


Link to post
Share on other sites
In the Directx control panel I''ve selected the d3d debug runtime and enabled shader debugging and I use vs.net which supports shader debugging. Thanks for the efforts guys. Any other suggestions?

PS
I''ve put a lot of information in the original post...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Make sure:
When starting your application use the menu item in vs.net; Debug, Direct3D, Start With Direct3D Debugging. (the hot key is CTRL+ALT+F5)

Make sure you are using the debug runtime

Don’t use a pure device
If you are debugging a vertex shader use HAL or REF with SWVP.
If you are debugging a pixel shader use REF with SWVP

Share this post


Link to post
Share on other sites
I''m using VS2002 and can debug shaders with no problems. Have you tried the suggestions above? That''s pretty much everything you need to know. There''s also a couple of places in the SDK docs that tell you all the steps you need to do to use shader debugging.

neneboricua

Share this post


Link to post
Share on other sites
Believe it or not, but it works!

So here''s the story, for anyone who cares to read. I read in the dx docs that you should build the shaders with D3DXSHADER_DEBUG and preferably D3DXSHADER_SKIPOPTIMIZATION. I did this and the assembling failed. Took it away and it worked again, and then I did everything else that I already have mentioned, and forgot to put those flags back again. (Btw, while mentioning everything else, couldn''t you have reminded me of this too???) So I put''em back, and the assembling once again failed. Now I got the idea to remove D3DXSHADER_SKIPOPTIMIZATION, and when I did that everything worked fine, including the debugger.:D

Share this post


Link to post
Share on other sites