我可以在发布模式下构建的应用程序中使用directX调试层运行时吗?

我可以在发布模式下构建的应用程序中使用directX调试层运行时吗?

问题描述:

正常代码如下:

#if defined(_DEBUG )

    createDeviceFlags | =
D3D11_CREATE_DEVICE_DEBUG ;

#endif

因为我们想调试一些问题我们的发布版本应用程序,我们仍然在发布版本中启用它。似乎我们现在遇到了一些崩溃(但是在调试构建和运行中没有崩溃),在发布版本的应用程序中使用
调试层运行时是否有任何限制?

谢谢,

Tango

您可以在"发布"中使用此标记。在开发人员或测试机器上构建(即优化的构建)。可能你的崩溃与应用程序的某些方面有关,这些方面在优化后会发生变化,因此请查看应用中的错误,例如未初始化的变量。

You can use this flag in a "Release" build (I.e. an optimized build) on a developer or test machine. Likely your crash is related to some aspect of your app that changes when optimized, so look for a bug in your app such as an uninitialized variable.

请记住SDK调试层不是存在于最终用户计算机上,因此D3D11_CREATE_DEVICE_DEBUG将始终失败。当计算机上安装了Windows 8.0 SDK时,这只是开发人员系统和测试系统的一个选项(它包含在VS
2012中)。

Keep in mind the SDK Debug Layer is not present on end-user machines, so D3D11_CREATE_DEVICE_DEBUG will always fail. This is only an option for developer systems and test systems when the Windows 8.0 SDK is installed on the machine (it's included with VS 2012).