-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Brave symbol server
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.
There are two ways to configure Visual Studio to use the symbol server:
- Set the
_NT_SYMBOL_PATH
environment variable before launchingdevenv.exe
:
set _NT_SYMBOL_PATH=SRV\*C:\symbols\*https://msdl.microsoft.com/download/symbols;SRV\*C:\symbols\*https://brave-symbols.s3.brave.com
- Add
https://brave-symbols.s3.brave.com
through the Visual Studio Options dialog:
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 yourPATH
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:
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:
- Select "Trust commands from this symbol file"
- Click "Run"
Visual Studio will then download the file and show you the exact source code location.
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.