5

i'm currently in the process of creating a Windows 8 applicaiton using SharpDX (the managed c# directx wrapper). However I have ran into problems with one of my shaders and I want to know if its possible to debug such applications. PIX doesn't seem to work of directX apps as the executable does not like opening directly, and the new visual studio graphics debugging toolkit in VS2012 always states "unable to start the experiment" when I try to capture any information about my session.

Thanks!

Shervanator
  • 457
  • 1
  • 4
  • 10
  • Could you clarify what you mean by "Windows 8 application"? Is this a Windows 8 Style app for the start screen, or a regular desktop application which happens to be on Windows 8? IIRC, the DXSDK PixWin requires things to be built with the DXSDK headers and libs, while VSPIX (Graphics Debugging in IDE) requires use of the Windows 8 Kits headers and libs. – Lars Viklund Oct 04 '12 at 05:02
  • Sorry I meant Windows 8 Style app for the start screen, what are the Windows 8 Kits headers? Do you mean just the stuff in the Windows namespace (i.e. using Windows;)? If so I already have them included. – Shervanator Oct 04 '12 at 07:18

2 Answers2

2

I'm coming to this post a bit late, but I would just like to add for future visitors to this thread that I have successfully used the Visual Studio 2012 Graphics Diagnostics ('the DirectX Debugger') in both SlimDX and SharpDX projects. There are a few things that can disrupt the process, notably in SlimDX projects I couldn't debug apps with mixed DX10/11, DX10 doesn't seem to work with VS2012, at least for managed code. So if you have any text rendering for example, you will have to remove it for the debugging session. I'd say using the following to isolate your DX10 code should work

#define DXDIAGSESSION
  // ... 
#if DXDIAGSESSION
  // your DX10 code goes here.
#endif

And for the SharpDX project (C# / WinRT / XAML / SharpDX) I couldn't use the Managed Only Debugger. I had to set the Debugger to Mixed (Managed and Native) to make it work.

Gavin Williams
  • 446
  • 1
  • 4
  • 14
0

The DirectX Visual Studio debugger only works with native code. You'll get the error that you are until you right-click on the project, select "Properties", go to the Debugging tab, and enable native debugging.

While that will remove the error it may or may not resolve the problem. I've got a similar scenario using SurfaceImageSource (C++) being hosted in a managed component and a DirectXPage in a C++ project. In both projects it appears that DirectX debugging is failing to capture frames. It appears this feature only works for programs that are using a DirectX UI (no managed UI components).

Joel
  • 2,230
  • 1
  • 20
  • 28