docs: update development-related documentation (#31043)
* docs: update chromium development-related documentation * chore: remove obsolete clang-format doc clang-format linting and fixing is a pre-commit hook now * docs: update debugging documentation * docs: misc updates * Update docs/development/debugging-on-windows.md Co-authored-by: Micha Hanselmann <mh74182@gmail.com> * Update docs/development/README.md Co-authored-by: Mark Lee <malept@users.noreply.github.com> * Update docs/development/README.md Co-authored-by: Mark Lee <malept@users.noreply.github.com> * Update docs/development/README.md Co-authored-by: Mark Lee <malept@users.noreply.github.com> * Update docs/development/README.md Co-authored-by: Mark Lee <malept@users.noreply.github.com> * Update docs/development/README.md Co-authored-by: Mark Lee <malept@users.noreply.github.com> * Update docs/development/README.md Co-authored-by: Mark Lee <malept@users.noreply.github.com> * Update docs/development/debugging-on-macos.md Co-authored-by: Mark Lee <malept@users.noreply.github.com> * Update docs/development/testing.md Co-authored-by: Mark Lee <malept@users.noreply.github.com> * Update docs/development/testing.md Co-authored-by: Mark Lee <malept@users.noreply.github.com> Co-authored-by: Micha Hanselmann <mh74182@gmail.com> Co-authored-by: Mark Lee <malept@users.noreply.github.com> Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
This commit is contained in:
parent
3193d7e99b
commit
771a8f70da
15 changed files with 227 additions and 186 deletions
56
docs/development/debugging-with-symbol-server.md
Normal file
56
docs/development/debugging-with-symbol-server.md
Normal file
|
@ -0,0 +1,56 @@
|
|||
# Setting Up Symbol Server in Debugger
|
||||
|
||||
Debug symbols allow you to have better debugging sessions. They have information
|
||||
about the functions contained in executables and dynamic libraries and provide
|
||||
you with information to get clean call stacks. A Symbol Server allows the
|
||||
debugger to load the correct symbols, binaries and sources automatically without
|
||||
forcing users to download large debugging files. The server functions like
|
||||
[Microsoft's symbol server](https://support.microsoft.com/kb/311503) so the
|
||||
documentation there can be useful.
|
||||
|
||||
Note that because released Electron builds are heavily optimized, debugging is
|
||||
not always easy. The debugger will not be able to show you the content of all
|
||||
variables and the execution path can seem strange because of inlining, tail
|
||||
calls, and other compiler optimizations. The only workaround is to build an
|
||||
unoptimized local build.
|
||||
|
||||
The official symbol server URL for Electron is
|
||||
https://symbols.electronjs.org.
|
||||
You cannot visit this URL directly, you must add it to the symbol path of your
|
||||
debugging tool. In the examples below, a local cache directory is used to avoid
|
||||
repeatedly fetching the PDB from the server. Replace `c:\code\symbols` with an
|
||||
appropriate cache directory on your machine.
|
||||
|
||||
## Using the Symbol Server in Windbg
|
||||
|
||||
The Windbg symbol path is configured with a string value delimited with asterisk
|
||||
characters. To use only the Electron symbol server, add the following entry to
|
||||
your symbol path (**Note:** you can replace `c:\code\symbols` with any writable
|
||||
directory on your computer, if you'd prefer a different location for downloaded
|
||||
symbols):
|
||||
|
||||
```powershell
|
||||
SRV*c:\code\symbols\*https://symbols.electronjs.org
|
||||
```
|
||||
|
||||
Set this string as `_NT_SYMBOL_PATH` in the environment, using the Windbg menus,
|
||||
or by typing the `.sympath` command. If you would like to get symbols from
|
||||
Microsoft's symbol server as well, you should list that first:
|
||||
|
||||
```powershell
|
||||
SRV*c:\code\symbols\*https://msdl.microsoft.com/download/symbols;SRV*c:\code\symbols\*https://symbols.electronjs.org
|
||||
```
|
||||
|
||||
## Using the symbol server in Visual Studio
|
||||
|
||||

|
||||

|
||||
|
||||
## Troubleshooting: Symbols will not load
|
||||
|
||||
Type the following commands in Windbg to print why symbols are not loading:
|
||||
|
||||
```powershell
|
||||
> !sym noisy
|
||||
> .reload /f electron.exe
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue