prefer sh
to bash
in the docs
This commit is contained in:
parent
c18afc924b
commit
1b0c1842ca
16 changed files with 87 additions and 81 deletions
|
@ -26,7 +26,7 @@ to enable step-through debugging with breakpoints inside Electron's source code.
|
|||
To start a debugging session, open up Terminal and start `lldb`, passing a debug
|
||||
build of Electron as a parameter.
|
||||
|
||||
```bash
|
||||
```sh
|
||||
$ lldb ./out/D/Electron.app
|
||||
(lldb) target create "./out/D/Electron.app"
|
||||
Current executable set to './out/D/Electron.app' (x86_64).
|
||||
|
@ -47,20 +47,20 @@ Let's assume that you want to debug `app.setName()`, which is defined in `browse
|
|||
as `Browser::SetName()`. Set the breakpoint using the `breakpoint` command, specifying
|
||||
file and line to break on:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
(lldb) breakpoint set --file browser.cc --line 117
|
||||
Breakpoint 1: where = Electron Framework`atom::Browser::SetName(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 20 at browser.cc:118, address = 0x000000000015fdb4
|
||||
```
|
||||
|
||||
Then, start Electron:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
(lldb) run
|
||||
```
|
||||
|
||||
The app will immediately be paused, since Electron sets the app's name on launch:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
(lldb) run
|
||||
Process 25244 launched: '/Users/fr/Code/electron/out/D/Electron.app/Contents/MacOS/Electron' (x86_64)
|
||||
Process 25244 stopped
|
||||
|
@ -79,7 +79,7 @@ Process 25244 stopped
|
|||
To show the arguments and local variables for the current frame, run `frame variable` (or `fr v`),
|
||||
which will show you that the app is currently setting the name to "Electron".
|
||||
|
||||
```bash
|
||||
```sh
|
||||
(lldb) frame variable
|
||||
(atom::Browser *) this = 0x0000000108b14f20
|
||||
(const string &) name = "Electron": {
|
||||
|
@ -91,7 +91,7 @@ To do a source level single step in the currently selected thread, execute `step
|
|||
This would take you into `name_override_.empty()`. To proceed and do a step over,
|
||||
run `next` (or `n`).
|
||||
|
||||
```bash
|
||||
```sh
|
||||
(lldb) step
|
||||
Process 25244 stopped
|
||||
* thread #1: tid = 0x839a4c, 0x0000000100162dcc Electron Framework`atom::Browser::SetName(this=0x0000000108b14f20, name="Electron") + 44 at browser.cc:119, queue = 'com.apple.main-thread', stop reason = step in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue