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

# XtfCaptureOutputEnd

> XtfCaptureOutputEnd

Stop capture of debug output.

## Syntax

```cpp theme={null}
void XtfCaptureOutputEnd(
         HANDLE hListen
)  
```

### Parameters

*hListen*\
Type: HANDLE

\[in] Listener handle returned by [XtfCaptureOutputBegin](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputbegin-xtfapi-xbox-windows-m.md).

### Return value

None.

## Remarks

Use the [XtfCaptureOutputBegin](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputbegin-xtfapi-xbox-windows-m.md) function and this function to start and stop capturing general debug output from a development console. If you want to monitor debug output from a specific process ID on a development console, use a debug monitor client. For more information about using a debug monitor client, see [XtfCreateDebugMonitorClient](https://docs.xbox.com/reference/tools/xtf/xtfdebugmonitor/methods/xtfcreatedebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m.md).

Call this function and specify the handle returned in `hListen` from the `XtfCaptureOutputBegin` function to stop capturing debug output and free the resources associated with the capture session.

> [!NOTE]
>
> You must call this function to stop a capture session. Otherwise, the capture session is orphaned and the resources associated with the capture session are not freed, causing a memory leak.

## Requirements

**Header:** xtfapi.h

**Library:** XtfApi.lib

**Supported platforms:** Windows (for XBOX console tools)

## See also

[IXtfDebugMonitorClient Interface](https://docs.xbox.com/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-t.md)\
[XTF Transport Errors (NDA topic)](https://docs.xbox.com/tools/tools-console/commandlinetools/xtf-transport-errors.md)\
[Additional Xtf APIs](https://docs.xbox.com/reference/tools/xtf/xtfapi/atoc-xtfapi.md)


## Related topics

- [XtfCaptureOutputBegin](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputbegin-xtfapi-xbox-windows-m.md)
- [Additional Xtf APIs (API contents)](https://docs.xbox.com/reference/tools/xtf/xtfapi/atoc-xtfapi.md)
- [XtfCaptureScreenshot](https://docs.xbox.com/reference/tools/xtf/xtfconsolecontrol/functions/xtfcapturescreenshot.md)
- [XtfDebugStringCallback](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfdebugstringcallback-xtfapi-xbox-windows-m.md)
- [XtfDebugStringErrorCallback](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfdebugstringerrorcallback-xtfapi-xbox-windows-m.md)
