Installing the Direct2D debug layer
For Windows 10 and Windows 11, the Direct2D debug layer is available in the Graphics Tools optional feature. On Windows 10 versions older than 22H2, navigate to Settings > Apps > Apps & features > Optional features, and click the Add a feature button. On Windows 10 22H2 and Windows 11, navigate to Settings > System > Optional features, and click the View features button inside the Add an optional feature control. Search for Graphics Tools, and click Add (or Install before Windows 10 22H2). With this feature added, you can create a device that supports the debug layer.
For Windows 8, the Direct2D debug layer is included with Microsoft Visual Studio Express 2012 for Windows 8.
The Direct2D debug layer for Windows 7 is no longer available for download.