"Enable Graphics Capture" in C# projects with DirectX components RRS feed

  • Question

  • Is there any way to enable the new DirectX debugging features in the VS Developer Preview from a C# metri app if you're using a DirectX C++ dll for rendering? (In my case, that's the SharpDX wrapper library - http://code.google.com/p/sharpdx/).
    Saturday, January 14, 2012 12:01 AM

All replies

  • The option is not available from the VS Express developer preview, so you have to add it manually to your vcproj file.

    Just add inside the correct Debug|AnyCpu PropertyGroup:

    <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCpu'">

    You should be able to view unmanaged debugging messages.

    Alexandre Mutel - SharpDX - NShader - Code4k
    Saturday, January 14, 2012 8:54 AM
  • Thanks Alexandre!
    Saturday, January 14, 2012 6:39 PM
  • Actually, it turns out the specific option I wanted <EnableVsGraphicsCapture>true</EnabledVSGraphicsCapture> doesn't seem to work when I add it to the project.user options file. This is the option that enables the PIX-style debugging for DirectX C++ apps in VS. (The general option for unmanaged debugging on does show up in the Ui it turns out.)
    • Edited by BorutP Monday, January 23, 2012 7:20 PM
    Monday, January 23, 2012 7:18 PM
  • In order to use new PIX under VS2011 with a managed application, you need to create an empty C++ project that will be only used to launch your managed project.

    Under the debugging property of the C++ project, just setup command target and working directory, and set "Enable Graphics Capture", then F5-debug you application, and in your application, press "Print Screen" to capture a frame: you are done (tested for example with SharpDX MiniTri sample).

    Though current new-PIX is extremely limited compare to other solutions like NVidia-NSight, AMD-GPUPerfStudio or Intel GPA.

    Note: That you can also use Direct3D C++ project capability to precompile your fx files

    Alexandre Mutel - SharpDX - NShader - Code4k

    Thursday, February 9, 2012 2:38 AM