Skip to content

Brave symbol server

Aleksei Khoroshilov edited this page Jan 29, 2025 · 11 revisions

Symbol Uploads and Access

Windows Brave builds (arm64, x86, x64) upload PDB files and binary images to Brave's symbol server.

The symbol server is available at https://brave-symbols.s3.brave.com. While this URL isn't meant for direct browsing, your debugger will use it to automatically download the symbols it needs.

Setting Up Visual Studio

There are two ways to configure Visual Studio to use the symbol server:

  1. Set the _NT_SYMBOL_PATH environment variable before launching devenv.exe:
set _NT_SYMBOL_PATH=SRV\*C:\symbols\*https://msdl.microsoft.com/download/symbols;SRV\*C:\symbols\*https://brave-symbols.s3.brave.com
  1. Add https://brave-symbols.s3.brave.com through the Visual Studio Options dialog: image

Automatic Source File Downloads

Brave's PDB files include source server information that enables Visual Studio to automatically download source files from GitHub. This means you don't need to have the exact Brave source code checked out locally.

Requirements:

  • Install Python 3
  • Ensure the py launcher is in your PATH

When you first open a call stack frame, Visual Studio will prompt you to download the source code file. You'll see a security dialog like this:

image

The command in the dialog will look similar to this:

cmd /c "mkdir "C:\Users\user\AppData\Local\SOURCE~1\base\task\thread_pool\worker_thread.cc\84eb7c6e8a38b0e65b14f75cfec8144ffbc4b359" & py -3 -c "import urllib.request, base64;url = \"https://raw.githubusercontent.com/brave/chromium/84eb7c6e8a38b0e65b14f75cfec8144ffbc4b359/base/task/thread_pool/worker_thread.cc\";u = urllib.request.urlopen(url);open(r\"C:\Users\user\AppData\Local\SOURCE~1\base\task\thread_pool\worker_thread.cc\84eb7c6e8a38b0e65b14f75cfec8144ffbc4b359\worker_thread.cc\", \"wb\").write((u.read()))"

To proceed:

  1. Select "Trust commands from this symbol file"
  2. Click "Run"

Visual Studio will then download the file and show you the exact source code location.

Note About Optimizations

Brave uses Profile-guided optimization (PGO), which can make debugging more challenging. Even with symbols loaded, code execution might not follow an expected path during debugging. This is a normal limitation of PGO-optimized builds.

Clone this wiki locally