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

# OnOutputDebugString

> IXtfDebugMonitorCallback::OnOutputDebugString Method

Called when an XBOX Tools Framework (XTF) app sends debug output.

## Syntax

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

### Parameters

*pData*\
Type: XTF\_OUTPUT\_DEBUG\_STRING\_DATA \*

Pointer that receives an [XTF\_OUTPUT\_DEBUG\_STRING\_DATA](https://docs.xbox.com/reference/tools/xtf/xtfdebugmonitor/structures/XTF_OUTPUT_DEBUG_STRING_DATA-xtfdebugmonitor-xbox-microsoft-t.md) structure that contains the debug string data.

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

This title-defined function handles the debug strings produced by games on the dev console. This function determines what happens to each debug string detected after [IXtfDebugMonitorClient::Start](https://docs.xbox.com/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/start-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m.md) is called. The title defined method must match the return value and parameters of the **IXtfDebugMonitorCallback::OnOutputDebugString** method.

## Requirements

**Header:** xtfdebugmonitor.h

**Library:** xtfdebugmonitor.lib

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

## See also

[IXtfDebugMonitorCallback Interface](https://docs.xbox.com/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorCallback/ixtfdebugmonitorcallback-xtfdebugmonitor-xbox-microsoft-t.md)\
[XtfDebugMonitor](https://docs.xbox.com/reference/tools/xtf/xtfdebugmonitor/xtfdebugmonitor-xbox-microsoft-n.md)\
[IXtfDebugMonitorCallback](https://docs.xbox.com/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorCallback/ixtfdebugmonitorcallback-xtfdebugmonitor-xbox-microsoft-t.md)


## Related topics

- [XTF_OUTPUT_DEBUG_STRING_DATA structure](https://docs.xbox.com/reference/tools/xtf/xtfdebugmonitor/structures/XTF_OUTPUT_DEBUG_STRING_DATA-xtfdebugmonitor-xbox-microsoft-t.md)
- [IXtfDebugMonitorCallback Interface (Interface contents)](https://docs.xbox.com/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorCallback/ixtfdebugmonitorcallback-xtfdebugmonitor-xbox-microsoft-t.md)
- [XtfDebugStringCallback](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfdebugstringcallback-xtfapi-xbox-windows-m.md)
- [Debug string monitoring (xbdbgmon.exe)](https://docs.xbox.com/tools/tools-console/commandlinetools/xbdbgmon.md)
- [XtfDebugStringErrorCallback](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfdebugstringerrorcallback-xtfapi-xbox-windows-m.md)
