-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Brave symbol server
You can debug Windows release Brave builds or crashdumps using Visual Studio or WinDBG.
The Brave symbol server is located at https://brave-symbols.s3.brave.com/.
To setup Visual Studio 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 symbols 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.
Please have in mind that Brave is built with Profile Guided Optimizations and other optimizations which may change the code flow substantially, and even having all symbols the execution during debugger steps might look weird.