> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IDStorageFactoryX::SetDebugFlags

> IDStorageFactoryX::SetDebugFlags

# IDStorageFactoryX::SetDebugFlags

Sets flags used to control the debug layer.

## Syntax

```cpp theme={null}
void SetDebugFlags(  
         UINT32 flags  
)  
```

### Parameters

*flags*\
Type: UINT32

A set of flags controlling the debug layer.

### Return value

Type: void

## Remarks

This method sets flags that control whether DirectStorage performs additional validations when requests are enqueued. The validations are intended to aid debugging.  Note that these debug flags only affect the behavior of errors that are detectable at enqueue time.  Errors that occur as part of the asynchronous
handling of requests, such as a corrupt stream or mismatched buffer size for compressed content, can be detected and retrieved through
[IDStorageStatusArrayX::GetHResult](/reference/system/dstorage/interfaces/IDStorageStatusArrayX/methods/idstoragestatusarrayx_gethresult) once those requests have completed.

The [DSTORAGE\_DEBUG](/reference/system/dstorage/enums/dstorage_debug) enumeration defines the flags used by `SetDebugFlags`.

## Requirements

**Header:** dstorage\_xs.h

**Library:** dstorage\_xs.lib

**Supported platforms:** XBOX Series consoles

## See also

[IDStorageFactoryX](/reference/system/dstorage/interfaces/IDStorageFactoryX/idstoragefactoryx)\
[DStorage](/reference/system/dstorage/dstorage_members)


## Related topics

- [DSTORAGE_DEBUG](/reference/system/dstorage/enums/dstorage_debug.md)
- [IDStorageFactoryX::SetCpuAffinity](/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_setcpuaffinity.md)
- [IDStorageFactoryX::SetStagingBufferSize](/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_setstagingbuffersize.md)
- [IDStorageFactoryX](/reference/system/dstorage/interfaces/IDStorageFactoryX/idstoragefactoryx.md)
- [DirectStorage Overview](/build/console-features/storage/directstorage/directstorage-overview.md)
