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

# IXtfDebugMonitorClient::Start Method

> IXtfDebugMonitorClient::Start Method

# IXtfDebugMonitorClient::Start Method

开始侦听来自开发主机的调试输出。

<a id="syntaxSection" />

## 语法

```cpp theme={null}
public:
HRESULT Start(
         DWORD dwProcessId,
         XTF_DBGMON_START_FLAGS dwFlags,
         IXtfDebugMonitorCallback *pCallback
)  
```

<a id="ID4EH" />

### 参数

*dwProcessId*\
类型：DWORD

进程的标识符。

*dwFlags*\
类型：XTF\_DBGMON\_START\_FLAGS

指定如何执行操作的标志。
此功能尚未完全开发，因此该参数应取值为 0。

*pCallback*\
类型：IXtfDebugMonitorCallback \*

指向 [IXtfDebugMonitorCallback](/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorCallback/ixtfdebugmonitorcallback-xtfdebugmonitor-xbox-microsoft-t) 的指针，当客户端从开发主机接收到调试输出时调用。

<a id="ID4EQ" />

### 返回值

类型：HRESULT

HRESULT 成功或错误代码。

<a id="requirements" />

## 要求

**头文件：** xtfdebugmonitor.h

**库：** xtfdebugmonitor.lib

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

<a id="ID4ENB" />

## 备注

此函数用于开始侦听开发主机上游戏的调试输出。完成侦听调试输出后，请调用 [IXtfDebugMonitorClient::Stop](/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/stop-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m) 停止侦听输出。如果不调用 [IXtfDebugMonitorClient::Stop](/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/stop-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m)，可能会导致资源泄漏以及与游戏之间存在孤立的调试器附加，这可能需要重新启动游戏才能修复。

## 另请参阅

<a id="ID4EPB" />

[IXtfDebugMonitorClient Interface](/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-t)\
[XtfDebugMonitor](/reference/tools/xtf/xtfdebugmonitor/xtfdebugmonitor-xbox-microsoft-n)\
[IXtfDebugMonitorClient::Stop](/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/stop-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m)


## Related topics

- [IXtfDebugMonitorClient::Stop Method](/zh-CN/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/stop-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m.md)
- [XtfCreateDebugMonitorClient](/zh-CN/reference/tools/xtf/xtfdebugmonitor/methods/xtfcreatedebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m.md)
- [IXtfDebugMonitorCallback::OnOutputDebugString Method](/zh-CN/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorCallback/methods/onoutputdebugstring-ixtfdebugmonitorcallback-xtfdebugmonitor-xbox-microsoft-m.md)
- [XtfCaptureOutputBegin](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputbegin-xtfapi-xbox-windows-m.md)
- [XtfCaptureOutputEnd](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputend-xtfapi-xbox-windows-m.md)
