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

# XtfDebugStringErrorCallback

> XtfDebugStringErrorCallback

# XtfDebugStringErrorCallback

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

<a id="syntaxSection" />

## Syntax

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

<a id="parametersSection" />

### 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](/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputbegin-xtfapi-xbox-windows-m).

<a id="retvalSection" />

### Return value

None.

<a id="remarksSection" />

## 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](/reference/tools/xtf/xtfapi/functions/xtfdebugstringcallback-xtfapi-xbox-windows-m) 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](/reference/tools/xtf/xtfdebugmonitor/methods/xtfcreatedebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m).

<a id="requirementsSection" />

## Requirements

**Header:** xtfapi.h

**Library:** XtfApi.lib

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

## See also

[XTF Transport Errors (NDA topic)](/tools/tools-console/commandlinetools/xtf-transport-errors)\
[Additional Xtf APIs](/reference/tools/xtf/xtfapi/atoc-xtfapi)


## Related topics

- [XtfDebugStringCallback](/reference/tools/xtf/xtfapi/functions/xtfdebugstringcallback-xtfapi-xbox-windows-m.md)
- [XtfCaptureOutputBegin](/reference/tools/xtf/xtfapi/functions/xtfcaptureoutputbegin-xtfapi-xbox-windows-m.md)
- [IXtfDebugMonitorCallback::OnOutputDebugString Method](/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorCallback/methods/onoutputdebugstring-ixtfdebugmonitorcallback-xtfdebugmonitor-xbox-microsoft-m.md)
- [XTF_OUTPUT_DEBUG_STRING_DATA structure](/reference/tools/xtf/xtfdebugmonitor/structures/XTF_OUTPUT_DEBUG_STRING_DATA-xtfdebugmonitor-xbox-microsoft-t.md)
- [IXtfDebugMonitorClient::Start Method](/reference/tools/xtf/xtfdebugmonitor/classes/IXtfDebugMonitorClient/methods/start-ixtfdebugmonitorclient-xtfdebugmonitor-xbox-microsoft-m.md)
