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

# XtfDebugStringErrorCallback

> XtfDebugStringErrorCallback

Callback invoked for each error captured by [XtfCaptureOutputBegin](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputbegin-xtfapi-xbox-windows-m.md).

## Syntax

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

### Parameters

*errorId*\
Type: HRESULT

\[in] The error that occurred.

*errorMessage*\
Type: PCWSTR

\[in] The error message for that error.

*context*\
Type: PVOID

\[in, optional] A pointer to a context object, passed into [XtfCaptureOutputBegin](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputbegin-xtfapi-xbox-windows-m.md).

### Return value

None.

## Remarks

This callback is invoked by the `XtfCaptureOutputBegin` function for each error captured during a capture session. Use this callback function, along with an [XtfDebugStringCallback](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfdebugstringcallback-xtfapi-xbox-windows-m.md) callback function, to capture 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).

## Requirements

**Header:** xtfapi.h

**Library:** XtfApi.lib

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

## See also

[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

- [XtfDebugStringCallback](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfdebugstringcallback-xtfapi-xbox-windows-m.md)
- [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)
- [OnOutputDebugString](https://docs.xbox.com/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorCallback/methods/onoutputdebugstring-ixtfdebugmonitorcallback-xtfdebugmonitor-xbox-microsoft-m.md)
- [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)
