docs: add debug build (#31979)

* docs: add debug build

* docs: move debug config document to debugging.md

* fix: debug.gn import failed

* docs: modify debug.gn folder on doc

* docs: imporve gn import path
This commit is contained in:
Black-Hole 2021-12-01 05:40:58 +08:00 committed by GitHub
parent 3d34fd7c91
commit bc8cfbac59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,6 +35,28 @@ base::debug::StackTrace().Print();
This will allow you to observe call chains and identify potential issue areas. This will allow you to observe call chains and identify potential issue areas.
## Breakpoint Debugging
> Note that this will increase the size of the build significantly, taking up around 50G of disk space
Write the following file to `electron/.git/info/exclude/debug.gn`
```gn
import("//electron/build/args/testing.gn")
is_debug = true
symbol_level = 2
forbid_non_component_debug_builds = false
```
Then execute:
```sh
$ gn gen out/Debug --args="import(\"//electron/.git/info/exclude/debug.gn\") $GN_EXTRA_ARGS"
$ ninja -C out/Debug electron
```
Now you can use `LLDB` for breakpoint debugging.
## Platform-Specific Debugging ## Platform-Specific Debugging
<!-- TODO(@codebytere): add debugging file for Linux--> <!-- TODO(@codebytere): add debugging file for Linux-->