Direct2D Debug Layer

Purpose

The Direct2D debug layer, implemented separately from Direct2D in its own DLL named d2d1debug.dll, provides design-time debug messages for you to minimize runtime application failure. The debug messages often result from violations of API contracts such as invalid parameters (could be Direct3D-related), invalid resources, threading violations, and other performance issues such as using a layer when a clip would suffice.

To help you decide how much information is traced by the debug layer, the debug layer offers three debug levels: information, warning, and error. These three levels are interpreted as follows:

  • Error: Direct2D sends severe error messages to the debug layer. For example, breaking a threading constraint will generate a severe error.

    Further, a message of level error triggers the breakpoint to help you debug.

  • Warning: Direct2D sends error messages and warnings to the debug layer so that you can address any of these messages.

  • Information: Direct2D sends error messages, warnings, and additional diagnostic information to the debug layer. For example, performance improvement messages will be sent at this debug level.

In this section

Topic Description
Installing the Direct2D Debug Layer
Describes how to install the Direct2D debug layer.
Direct2D Debug Layer Overview
Debug Messages
Lists the debug messages from the Direct2D Debug Layer.