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

# Troubleshooting XBOX Live Services APIs

> Enable XSAPI response logging and verbose debug tracing with HCSettingsSetTraceLevel to diagnose XBOX Live services REST calls and HTTP response failures.

It is difficult to diagnose a failure using only the error from the XBOX Live Services API layer.
Additional, helpful error information — such as logging of all RESTful calls — can be made available to the server.

To listen to this additional data, hook up the response logger and enable debug tracing.
Response logging allows you to see HTTP traffic and web service response codes, which is often as useful as a Fiddler trace.

## Code example

The following code example enables response logging, and sets the debug error level to **Verbose**.
(You can also set the debug error level to **Error**, to show only trace failed calls; or to **Off**, to disable tracing.)

The resulting debug output is sent to the Output pane when running your project in Visual Studio.

**C API**

```cpp theme={null}
HCSettingsSetTraceLevel(HCTraceLevel::Verbose); // See HCTraceLevel enum for various levels
HCTraceSetTraceToDebugger(true);
```

```cpp theme={null}
void CALLBACK TraceCallback(
    _In_z_ char const* areaName,
    enum HCTraceLevel level,
    uint64_t threadId,
    uint64_t timestamp,
    _In_z_ char const* message
)
{
    // Log info
}

HCTraceSetClientCallback(TraceCallback);
```


## Related topics

- [Troubleshooting](/services/xbox-services/develop/troubleshooting/index.md)
- [Troubleshooting XBOX services sign-in](/services/xbox-services/fundamentals/identity/auth/live-troubleshooting-sign-in.md)
- [Troubleshooting Sign-in and Sandbox Errors](/services/xbox-services/develop/troubleshooting/live-troubleshoot-sandboxes.md)
- [Multiplayer FAQ and troubleshooting](/services/xbox-services/multiplayer/mpsd/concepts/live-multiplayer-2015-faq.md)
- [XBOX Live HRESULT error codes](/reference/live/xbl-hresult-error-codes.md)
