• Advertisement
Sign in to follow this  

[MDX] Managed DirectX Debugging

This topic is 4478 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

Hello, I am using Managed DirectX 2.0 Beta (December 2005 Update), and therefore the 2.0 .NET Framework in Visual Studio C# Express 2005. I am stuck and can't get any output from DirectX while debugging. The Managed Documentation only has a few lines on the subject:
Quote:
Debugging DirectX Applications From the Visual Studio .NET 2003 Integrated Development Environment (IDE): Within the Solution Explorer pane, right-click your project (not the solution) and select Properties. Click the Configuration Properties folder at the left, then click the Debugging selection. Within the Debuggers options, set Enable Unmanaged Debugging to True. It is set to False by default.
Unfortunately, that only concerns MDX for version 1.1 of the Framework and only for Visual Studio 2003. I have tried similar steps in VS 2005 but can't get any debug output from DX. Any clues?

Share this post


Link to post
Share on other sites
Advertisement
I think (guess) that what they call "unmanaged debugging" is just the standard debugging output from "normal" directx, as managed directx is nothing more than a set of wrappers around the normal code. You can enable some debugging output in control panel -> directx -> use debug version.

Share this post


Link to post
Share on other sites
I have already played with the Control Panel options to use the "Debug Runtime Version of Direct3D", set the "Debug Output Level" to the max, and checked "Maximum Validation". By I am still not getting ANY output from DirectX. So it must be a Visual Studio 2005 option, which I can't find to allow such output to appear in my output window.

Share this post


Link to post
Share on other sites
There is also an option to set a single assembly to debug mode. Go to the managed tab in the DX settings, open Microsoft.DirectX, select the MDX2.0 assembly, right click, and select "Use debug".

Note - this doesn't work either.

Share this post


Link to post
Share on other sites
I didn't know you could right click and set the MDX DLLs to Debug Mode. I did what you said, and even if it still doesn't work, I get a message which I didnt before:

Quote:
The HRESULT 0x80004005 was returned (E_FAIL). Please turn on unmanaged debugging for more information. A first chance exception of type 'Microsoft.DirectX.DirectXException' occurred in Microsoft.DirectX.dll


So now, thanks to your help, MDX is outputing debug information, but I still need to find how to allow unmanaged debugging in Visual Studio 2005.

[Edited by - David Hart on January 19, 2006 8:04:43 AM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Right click on a project, properties, debug, Enable unmanaged code debugging.

Worked for me.

Share this post


Link to post
Share on other sites
Are you sure we are both talking about Visual Studio C# Express 2005, because I don't have any "Enable unmanaged code debugging" option in my Project properties.

Share this post


Link to post
Share on other sites
.Net 2.0 is, as you're aware, still in the beta stage... you might well get a better response from the beta newsgroups (see here for details). The appropriate developers will be more actively engaged in those groups, so should be able to tell you if you've got a bug, intended feature or you're just not doing it correctly [wink]

hth
JAck

Share this post


Link to post
Share on other sites
Well, I can only confirm that MDX 2.0 debugging works in the 'normal' Visual Studio 2005. Right-click on your project name and select properties. This should bring up a properties sheet in the central area (at least in my VS 2005). On the left of this sheet, click on the Debug 'tab'. Then you will be presented with the option to "Enable Unmanaged Code Debugging" on the bottom part of the sheet.

You will also need to switch your DirectX runtime to the debug runtime (as said, in the control panel) and raise the amount of output, since leaving the slider on the default (least) setting will not produce any DirectX debug output, at least not for the BasicHLSL_2005 sample from the SDK.

Hope this helps... If you don't have a property sheet like I mentioned in the VS 2005 Express Edition, then please let us know so we may avoid confusion in the future :)

Share this post


Link to post
Share on other sites
Quote:
You will also need to switch your DirectX runtime to the debug runtime (as said, in the control panel) and raise the amount of output, since leaving the slider on the default (least) setting will not produce any DirectX debug output, at least not for the BasicHLSL_2005 sample from the SDK.


I have already set all these options correctly.

Quote:
Well, I can only confirm that MDX 2.0 debugging works in the 'normal' Visual Studio 2005. Right-click on your project name and select properties. This should bring up a properties sheet in the central area (at least in my VS 2005). On the left of this sheet, click on the Debug 'tab'. Then you will be presented with the option to "Enable Unmanaged Code Debugging" on the bottom part of the sheet.


It's good to know that it 'can' work. To better explain my problem, I took a screenshot of my Properties > Debug Panel. As you can see, I have the property sheet, but it seems like the "Enable Unmanaged Code Debugging" option didn't make it into the Express Edition.



By the way, what is you "normal" edition? Do you mean the Standard Edition?

Share this post


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

  • Advertisement