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

# HCTracePlatformWriteMessageToDebuggerCallback

> Platform hook that writes a formatted libHttpClient trace message to the debugger.

# HCTracePlatformWriteMessageToDebuggerCallback

Platform hook that writes a formatted libHttpClient trace message to the debugger.

## Syntax

```cpp theme={null}
void CALLBACK HCTracePlatformWriteMessageToDebuggerCallback(  
         char const* areaName,  
         HCTraceLevel level,  
         char const* message,  
         void* context  
)  
```

### Parameters

The header declares these parameters without names. This page uses descriptive labels.

*areaName*\
Type: char const\*

Name of the trace area that produced the message.

*level*\
Type: [HCTraceLevel](https://docs.xbox.com/reference/live/httpclient/trace/enums/hctracelevel.md)

Trace level of the message.

*message*\
Type: char const\*

Formatted message, including the thread ID, level, time, and area prefix and a trailing line break.

*context*\
Type: void\*

The *writeToDebuggerContext* value that was passed to [HCTraceSetPlatformCallbacks](https://docs.xbox.com/reference/live/httpclient/trace/functions/hctracesetplatformcallbacks.md).

### Return value

Type: void

## Remarks

Set this callback by calling [HCTraceSetPlatformCallbacks](https://docs.xbox.com/reference/live/httpclient/trace/functions/hctracesetplatformcallbacks.md) before you initialize libHttpClient. libHttpClient calls the callback only when debugger output is turned on by [HCTraceSetTraceToDebugger](https://docs.xbox.com/reference/live/httpclient/trace/functions/hctracesettracetodebugger.md).

> [!NOTE]
>
> The XBOX Game Development Kit (GDK) builds of libHttpClient for Windows PC and XBOX consoles don't call this callback. They write debugger output with `OutputDebugStringA` instead. Only libHttpClient builds that use the generic platform tracing implementation call this hook.

## Requirements

**Header:** trace.h

**Library:** libHttpClient.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[trace](https://docs.xbox.com/reference/live/httpclient/trace/trace_members.md)\
[HCTraceSetPlatformCallbacks](https://docs.xbox.com/reference/live/httpclient/trace/functions/hctracesetplatformcallbacks.md)\
[HCTracePlatformThisThreadIdCallback](https://docs.xbox.com/reference/live/httpclient/trace/functions/hctraceplatformthisthreadidcallback.md)\
[HCTraceSetTraceToDebugger](https://docs.xbox.com/reference/live/httpclient/trace/functions/hctracesettracetodebugger.md)


## Related topics

- [HCTraceSetPlatformCallbacks](https://docs.xbox.com/reference/live/httpclient/trace/functions/hctracesetplatformcallbacks.md)
- [trace (contents)](https://docs.xbox.com/reference/live/httpclient/trace/trace_members.md)
- [HCTracePlatformThisThreadIdCallback](https://docs.xbox.com/reference/live/httpclient/trace/functions/hctraceplatformthisthreadidcallback.md)
- [HCTraceCallback](https://docs.xbox.com/reference/live/httpclient/trace/functions/hctracecallback.md)
- [HCTraceSetTraceToDebugger](https://docs.xbox.com/reference/live/httpclient/trace/functions/hctracesettracetodebugger.md)
