Skip to content

Commit ee7b00e

Browse files
update extension README
1 parent b423842 commit ee7b00e

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

lldb/tools/lldb-dap/README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,19 @@ This will attach to a process `a.out` whose process ID is 123:
6565
}
6666
```
6767

68+
You can also use the variable substituion `${command:PickProcess}` to select a
69+
process at the start of the debug session instead of setting the pid manually:
70+
71+
```javascript
72+
{
73+
"type": "lldb-dap",
74+
"request": "attach",
75+
"name": "Attach to PID",
76+
"program": "/tmp/a.out",
77+
"pid": "${command:PickProcess}"
78+
}
79+
```
80+
6881
#### Attach by Name
6982

7083
This will attach to an existing process whose base
@@ -224,7 +237,7 @@ the following `lldb-dap` specific key/value pairs:
224237
| Parameter | Type | Req | |
225238
|-----------------------------------|-------------|:---:|---------|
226239
| **program** | string | | Path to the executable to attach to. This value is optional but can help to resolve breakpoints prior the attaching to the program.
227-
| **pid** | number | | The process id of the process you wish to attach to. If **pid** is omitted, the debugger will attempt to attach to the program by finding a process whose file name matches the file name from **porgram**. Setting this value to `${command:pickMyProcess}` will allow interactive process selection in the IDE.
240+
| **pid** | number | | The process id of the process you wish to attach to. If **pid** is omitted, the debugger will attempt to attach to the program by finding a process whose file name matches the file name from **program**. Setting this value to `${command:PickProcess}` will allow interactive process selection in the IDE.
228241
| **waitFor** | boolean | | Wait for the process to launch.
229242
| **attachCommands** | [string] | | LLDB commands that will be executed after **preRunCommands** which take place of the code that normally does the attach. The commands can create a new target and attach or launch it however desired. This allows custom launch and attach configurations. Core files can use `target create --core /path/to/core` to attach to core files.
230243

0 commit comments

Comments
 (0)