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

# IXtfDebugMonitorCallback::OnOutputDebugString Method

> IXtfDebugMonitorCallback::OnOutputDebugString Method

# IXtfDebugMonitorCallback::OnOutputDebugString Method

当 XBOX Tools Framework (XTF) 应用发送调试输出时调用。

<a id="syntaxSection" />

## 语法

```cpp theme={null}
public:
HRESULT OnOutputDebugString(
         const XTF_OUTPUT_DEBUG_STRING_DATA *pData
)  
```

<a id="ID4EH" />

### 参数

*pData*\
类型：XTF\_OUTPUT\_DEBUG\_STRING\_DATA \*

接收 [XTF\_OUTPUT\_DEBUG\_STRING\_DATA](/reference/tools/xtf/xtfdebugmonitor/structures/XTF_OUTPUT_DEBUG_STRING_DATA-xtfdebugmonitor-xbox-microsoft-t) 结构的指针，该结构包含调试字符串数据。

<a id="ID4EQ" />

### 返回值

类型：HRESULT

HRESULT 成功或错误代码。

<a id="requirements" />

## 备注

此标题定义的函数处理开发主机上游戏生成的调试字符串。此函数决定在调用 [IXtfDebugMonitorClient::Start](/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/start-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m) 后检测到的每个调试字符串将如何处理。标题定义的方法必须与 **IXtfDebugMonitorCallback::OnOutputDebugString** 方法的返回值和参数相匹配。

## 要求

**头文件：** xtfdebugmonitor.h

**库：** xtfdebugmonitor.lib

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

<a id="ID4EHB" />

## 另请参阅

<a id="ID4EJB" />

[IXtfDebugMonitorCallback Interface](/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorCallback/ixtfdebugmonitorcallback-xtfdebugmonitor-xbox-microsoft-t)\
[XtfDebugMonitor](/reference/tools/xtf/xtfdebugmonitor/xtfdebugmonitor-xbox-microsoft-n)\
[IXtfDebugMonitorCallback](/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorCallback/ixtfdebugmonitorcallback-xtfdebugmonitor-xbox-microsoft-t)


## Related topics

- [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)
- [XtfCreateDebugMonitorClient](/zh-CN/reference/tools/xtf/xtfdebugmonitor/methods/xtfcreatedebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m.md)
- [XtfDebugStringCallback](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfdebugstringcallback-xtfapi-xbox-windows-m.md)
- [XtfDebugStringErrorCallback](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfdebugstringerrorcallback-xtfapi-xbox-windows-m.md)
