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

# SetDebugFlags

> IDStorageFactoryX::SetDebugFlags

# IDStorageFactoryX::SetDebugFlags

設定用來控制偵錯層的旗標。

## 語法

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

### 參數

*flags*\
類型：UINT32

控制偵錯層的一組旗標。

### 傳回值

類型：void

## 備註

此方法會設定旗標，以控制 DirectStorage 是否在要求加入佇列時執行額外的驗證。這些驗證旨在協助偵錯。請注意，這些偵錯旗標只會影響在加入佇列時可偵測到之錯誤的行為。在要求的非同步
處理過程中發生的錯誤 (例如損毀的資料流，或壓縮內容的緩衝區大小不符)，可在這些要求完成後透過
[IDStorageStatusArrayX::GetHResult](https://docs.xbox.com/zh-TW/reference/system/dstorage/interfaces/IDStorageStatusArrayX/methods/idstoragestatusarrayx_gethresult.md) 偵測並擷取。

[DSTORAGE\_DEBUG](https://docs.xbox.com/zh-TW/reference/system/dstorage/enums/dstorage_debug.md) 列舉定義了 `SetDebugFlags` 所使用的旗標。

## 需求

**標頭：** dstorage\_xs.h

**程式庫：** dstorage\_xs.lib

**支援的平台：** XBOX Series 主機

## 另請參閱

[IDStorageFactoryX](https://docs.xbox.com/zh-TW/reference/system/dstorage/interfaces/IDStorageFactoryX/idstoragefactoryx.md)\
[DStorage](https://docs.xbox.com/zh-TW/reference/system/dstorage/dstorage_members.md)


## Related topics

- [DSTORAGE_DEBUG](https://docs.xbox.com/zh-TW/reference/system/dstorage/enums/dstorage_debug.md)
- [IDStorageFactoryX (介面內容)](https://docs.xbox.com/zh-TW/reference/system/dstorage/interfaces/IDStorageFactoryX/idstoragefactoryx.md)
- [DirectStorage 概觀](https://docs.xbox.com/zh-TW/build/console-features/storage/directstorage/directstorage-overview.md)
- [Start](https://docs.xbox.com/zh-TW/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/start-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m.md)
- [Stop](https://docs.xbox.com/zh-TW/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/stop-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m.md)
