docs: add .lldbinit to macOS debugging docs (#21879)

* docs: add .lldbinit to macOS debugging docs

* fix lint by adding language to fenced code block

* remove trailing whitespace 😑
This commit is contained in:
loc 2020-01-27 08:10:25 -08:00 committed by Robo
parent eaa907d1dc
commit f34cbe66a0

View file

@ -23,6 +23,11 @@ you prefer a graphical interface.
They include LLDB, the default debugger in Xcode on Mac OS X. It supports They include LLDB, the default debugger in Xcode on Mac OS X. It supports
debugging C, Objective-C and C++ on the desktop and iOS devices and simulator. debugging C, Objective-C and C++ on the desktop and iOS devices and simulator.
* **.lldbinit**: Create or edit `~/.lldbinit` to allow Chromium code to be properly source-mapped.
```text
command script import ~/electron/src/tools/lldb/lldbinit.py
```
## Attaching to and Debugging Electron ## Attaching to and Debugging Electron
To start a debugging session, open up Terminal and start `lldb`, passing a non-release To start a debugging session, open up Terminal and start `lldb`, passing a non-release
@ -105,6 +110,8 @@ Process 25244 stopped
122 return badge_count_; 122 return badge_count_;
``` ```
**NOTE:** If you don't see source code when you think you should, you may not have added the `~/.lldbinit` file above.
To finish debugging at this point, run `process continue`. You can also continue until a certain To finish debugging at this point, run `process continue`. You can also continue until a certain
line is hit in this thread (`thread until 100`). This command will run the thread in the current line is hit in this thread (`thread until 100`). This command will run the thread in the current
frame till it reaches line 100 in this frame or stops if it leaves the current frame. frame till it reaches line 100 in this frame or stops if it leaves the current frame.