> ## 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.

# XtfDebugStringCallback

> XtfDebugStringCallback

# XtfDebugStringCallback

針對 [XtfCaptureOutputBegin](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputbegin-xtfapi-xbox-windows-m) 所擷取的每個輸出偵錯字串叫用的回呼。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
void *XtfDebugStringCallback(
         UINT32 processId,
         UINT32 threadId,
         UINT16 cpuGroup,
         UINT16 cpuIndex,
         UINT32 level,
         UINT32 componentId,
         UINT32 sequenceNumber,
         UINT64 interruptTime,
         UINT32 flags,
         PCWSTR sourceIdentifier,
         PCWSTR messageData,
         PVOID context
)  
```

<a id="parametersSection" />

### 參數

*processId*\
類型: UINT32

\[in] 此偵錯字串的處理序識別碼。

*threadId*\
類型: UINT32

\[in] 遊戲的執行緒識別碼。

*cpuGroup*\
類型: UINT16

\[in] 遊戲的 CPU 群組。

*cpuIndex*\
類型: UINT16

\[in] 遊戲的 CPU 索引。

*level*\
類型: UINT32

\[in] 保留供內部使用。

*componentId*\
類型: UINT32

\[in] 保留供內部使用。

*sequenceNumber*\
類型: UINT32

\[in] 偵錯字串的序號。在偵錯字串可能以錯誤順序傳回的少數情況下，此參數的值可讓您判斷偵錯輸出的順序。

*interruptTime*\
類型: UINT64

\[in] 保留供內部使用。

*flags*\
類型: UINT32

\[in] 保留供內部使用。

*sourceIdentifier*\
類型: PCWSTR

\[in] 偵錯字串的來源。此參數會設為 "Title" 或 "System"。

*messageData*\
類型: PCWSTR

\[in] 偵錯輸出字串。

*context*\
類型: PVOID

\[in, optional] 傳入 [XtfCaptureOutputBegin](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputbegin-xtfapi-xbox-windows-m) 之內容物件的指標。

<a id="retvalSection" />

### 傳回值

無。

<a id="remarksSection" />

## 備註

`XtfCaptureOutputBegin` 函式會針對擷取工作階段期間擷取的每個輸出偵錯字串叫用此回呼。使用此回呼函式搭配 [XtfDebugStringErrorCallback](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfdebugstringerrorcallback-xtfapi-xbox-windows-m) 回呼函式，擷取來自開發主機的一般偵錯輸出。如果您想要監視來自開發主機上特定處理序識別碼的偵錯輸出，請使用偵錯監視器用戶端。如需使用偵錯監視器用戶端的詳細資訊，請參閱 [XtfCreateDebugMonitorClient](/zh-TW/reference/tools/xtf/xtfdebugmonitor/methods/xtfcreatedebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m)。

<a id="requirementsSection" />

## 需求

**標頭:** xtfapi.h

**程式庫:** XtfApi.lib

**支援的平台:** Windows (適用於 XBOX 主機工具)

## 另請參閱

[XTF 傳輸錯誤 (NDA 主題)](/zh-TW/tools/tools-console/commandlinetools/xtf-transport-errors)\
[其他 Xtf API](/zh-TW/reference/tools/xtf/xtfapi/atoc-xtfapi)


## Related topics

- [XtfDebugStringErrorCallback](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfdebugstringerrorcallback-xtfapi-xbox-windows-m.md)
- [XtfCaptureOutputBegin](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputbegin-xtfapi-xbox-windows-m.md)
- [IXtfDebugMonitorCallback::OnOutputDebugString 方法](/zh-TW/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorCallback/methods/onoutputdebugstring-ixtfdebugmonitorcallback-xtfdebugmonitor-xbox-microsoft-m.md)
- [XTF_OUTPUT_DEBUG_STRING_DATA 結構](/zh-TW/reference/tools/xtf/xtfdebugmonitor/structures/XTF_OUTPUT_DEBUG_STRING_DATA-xtfdebugmonitor-xbox-microsoft-t.md)
- [IXtfDebugMonitorClient::Start 方法](/zh-TW/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/start-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m.md)
