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

# XtfDebugStringErrorCallback

> XtfDebugStringErrorCallback

# XtfDebugStringErrorCallback

对由 [XtfCaptureOutputBegin](/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputbegin-xtfapi-xbox-windows-m) 捕获的每个错误调用的回调。

<a id="syntaxSection" />

## 语法

```cpp theme={null}
void XtfDebugStringErrorCallback(
         HRESULT errorId,
         PCWSTR errorMessage,
         PVOID context
)  
```

<a id="parametersSection" />

### 参数

*errorId*\
类型：HRESULT

\[in] 发生的错误。

*errorMessage*\
类型：PCWSTR

\[in] 该错误的错误消息。

*context*\
类型：PVOID

\[in, optional] 指向传入 [XtfCaptureOutputBegin](/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputbegin-xtfapi-xbox-windows-m) 的上下文对象的指针。

<a id="retvalSection" />

### 返回值

无。

<a id="remarksSection" />

## 备注

在捕获会话期间，`XtfCaptureOutputBegin` 函数会针对捕获到的每个错误调用此回调。将此回调函数与 [XtfDebugStringCallback](/reference/tools/xtf/xtfapi/functions/xtfdebugstringcallback-xtfapi-xbox-windows-m) 回调函数一起使用，以从开发主机捕获一般调试输出。如果你想监视开发主机上特定进程 ID 的调试输出，请使用调试监视客户端。有关使用调试监视客户端的更多信息，请参阅 [XtfCreateDebugMonitorClient](/reference/tools/xtf/xtfdebugmonitor/methods/xtfcreatedebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m)。

<a id="requirementsSection" />

## 要求

**头文件：** xtfapi.h

**库：** XtfApi.lib

**支持的平台：** Windows（用于 XBOX 主机工具）

## 另请参阅

[XTF 传输错误 (NDA 主题)](/tools/tools-console/commandlinetools/xtf-transport-errors)\
[其他 Xtf API](/reference/tools/xtf/xtfapi/atoc-xtfapi)


## Related topics

- [XtfDebugStringCallback](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfdebugstringcallback-xtfapi-xbox-windows-m.md)
- [XtfCaptureOutputBegin](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputbegin-xtfapi-xbox-windows-m.md)
- [IXtfDebugMonitorCallback::OnOutputDebugString Method](/zh-CN/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorCallback/methods/onoutputdebugstring-ixtfdebugmonitorcallback-xtfdebugmonitor-xbox-microsoft-m.md)
- [XTF_OUTPUT_DEBUG_STRING_DATA structure](/zh-CN/reference/tools/xtf/xtfdebugmonitor/structures/XTF_OUTPUT_DEBUG_STRING_DATA-xtfdebugmonitor-xbox-microsoft-t.md)
- [IXtfDebugMonitorClient::Start Method](/zh-CN/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/start-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m.md)
