-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Brave symbol server
Official Windows Brave builds (arm64, x86, x64) upload PDBs and binary images to Brave symbol server.
The symbol server is accessible via https://brave-symbols.s3.brave.com.
To setup Visual Studio to use the symbol server you can either:
- set
_NT_SYMBOL_PATH
environment variable before runningdevenv.exe
:
set _NT_SYMBOL_PATH=SRV\*C:\symbols\*https://msdl.microsoft.com/download/symbols;SRV\*C:\symbols\*https://brave-symbols.s3.brave.com
- or add
https://brave-symbols.s3.brave.com
via Options dialog:
Brave PDBs include source server information which allows Visual Studio to automatically download source files from GitHub. This greatly simplifies the debug process as you don't need to have the exact Brave source tree checked-out locally.
To have this working you need to install Python 3 and make sure py
launcher is in your PATH
.
The download is triggered by Visual Studio when a call stack frame is opened. One time per PDB you will see a security dialog asking you to execute a command:
The command in this example look like 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()))"
If you trust the command, then:
- Choose "Trust commands from this symbol file"
- Press "Run".
Visual Studio will download symbols and display the exact source location automatically.
Brave is built with Profile Guided Optimizations enabled, which may change the code flow substantially, and even having all symbols the execution during debugger steps might look weird. That's the sad reality of PGO builds.