---
sidebar_label: Debug & Log
---
import PublicClient from '../partials/callouts/public-client.mdx';
import SupportCallout from '../partials/callouts/support.mdx';

[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [How To](/docs/discord-social-sdk/how-to) > {sidebar_label}

# {sidebar_label}

## Overview

This guide will help you understand how to install debugging symbols and handle logging to assist in building your Discord Social SDK integration.

## Debugging

Debugging symbols are hosted at https://storage.googleapis.com/discord-public-symbols. If using Visual Studio, you can add this link to the pdb locations under `Tools > Options > Debugging > Symbols`. 

:::info
Note: You won't be able to browse files using that link, but that's ok. Individual files are accessible under the domain, and the URL functions properly as a symbol server, so it works in Visual Studio.
:::

## Logging

You can access Discord's logs with [`Client::AddLogCallback`]. We recommend writing logs to a file and, during testing, including verbose logs. The [`Client::SetLogDir`] function will write the SDK's logs to that directory if set. 

```cpp
client->AddLogCallback([](auto message, auto severity) {
  std::cout << "[" << EnumToString(severity) << "] " << message << std::endl;
}, discordpp::LoggingSeverity::Info);
```

### Audio Logging

For diagnosing issues with acoustic echo cancellation (AEC), you can use the [`Client::SetAecDump`] function. This
enables diagnostic recording of audio input and output waveform data, which can be invaluable when troubleshooting echo,
feedback, or other audio processing problems.

[`Client::SetAecDump`] Enables or disables AEC diagnostic recording. When enabled, the input and output waveform data will be written to the
log directory (the same directory specified by [`Client::SetLogDir`]).

```cpp
// Enable AEC diagnostic recording
client->SetAecDump(true);

// ... perform voice chat operations to reproduce the issue ...

// Disable AEC diagnostic recording when done
client->SetAecDump(false);
```

**When to use:**
- Users report echo or feedback during voice chat
- Audio quality issues that may be related to echo cancellation
- Testing AEC performance in different environments
- Debugging audio processing pipeline issues

:::warn
AEC dump files can become large quickly as they contain raw waveform data. Remember to disable the diagnostic recording
once you've captured the necessary data for analysis.
:::

## Client Tools

The Discord client now includes some built-in developer tools to help you diagnose issues and test some of the features of the Discord Social SDK. To enable these new tools, navigate to `Settings > Advanced` and toggle on Application Test Mode. For the purposes of this guide, enter your Application ID and ignore the rest of the options in this modal, then click Activate. Once you've enabled Application Test Mode, you should see a new wrench icon in the upper right corner of your client. Click on this to open the developer tools.

### Account Linking

This tab shows you the status of each of the on-platform account linking flows as well as provides a quick option to start the account linking flow without needing to find one of the entry points within the client. For more information on each of the flows, read the [Account Linking from Discord guide](/docs/discord-social-sdk/development-guides/account-linking-from-discord).

--- 

## Next Steps

<Container>
  <Card title="Getting Started Guide" link="/docs/discord-social-sdk/getting-started">
    Learn how to get started with the Discord Social SDK.
  </Card>
  <Card title="Core Concepts" link="/docs/discord-social-sdk/core-concepts">
    Understand the core concepts of the Discord Social SDK.
  </Card>
  <Card title="Account Linking with Discord" link="/docs/discord-social-sdk/development-guides/account-linking-with-discord">
    Learn how to link user accounts with Discord.
  </Card>
</Container>

<SupportCallout />

---

## Change Log

| Date              | Changes          |
|-------------------|------------------|
| March 17, 2025    | initial release  |
| November 17, 2025 | add client tools |

{/* Autogenerated Reference Links */}
[`Client::AddLogCallback`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#af78996cff24a40f5dc7066beed16692c
[`Client::SetAecDump`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a3a05b2cafaa546d915a5249c63f4059f
[`Client::SetLogDir`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a23bd5802dfa3072201ea864ee839c001