Skip to content

Commit 9c99e07

Browse files
authored
[lldb-dap][docs] Fix README (#110982)
Apparently, the markdown parser used by the VSCode Marketplace does not support escaped backticks the same way that Github does. This leads to the table of launch / attach options to be rendered as an unformatted blob instead of as a table. See https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.lldb-dap This commit fixes the issue by completely avoiding escaped backticks in the README. While at it, I also fixed a couple of typos / small wording issues. Also, I reordered the ways to procure the `lldb-dap` binary in priority order: Most users should prefer the toolchain-provided binary over building it from source.
1 parent 759a7b5 commit 9c99e07

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

lldb/tools/lldb-dap/README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ The extension requires the `lldb-dap` (formerly `lldb-vscode`) binary.
66
This binary is not packaged with the VS Code extension.
77

88
There are multiple ways to obtain this binary:
9-
* build it from source (see [LLDB's build instructions](https://lldb.llvm.org/resources/build.html))
10-
* download one of the relase packages from the [LLVM release page](https://github.com/llvm/llvm-project/releases/). The `LLVM-19.1.0-{operating_system}.tar.xz` packages contain a prebuilt `lldb-dap` binary.
119
* use the binary provided by your toolchain (for example `xcrun -f lldb-dap` on macOS) or contact your toolchain vendor to include it.
10+
* download one of the relase packages from the [LLVM release page](https://github.com/llvm/llvm-project/releases/). The `LLVM-19.1.0-{operating_system}.tar.xz` packages contain a prebuilt `lldb-dap` binary.
11+
* build it from source (see [LLDB's build instructions](https://lldb.llvm.org/resources/build.html))
1212

1313
By default, the VS Code extension will expect to find `lldb-dap` in your `PATH`.
1414
Alternatively, you can explictly specify the location of the `lldb-dap` binary using the `lldb-dap.executable-path` setting.
@@ -185,7 +185,7 @@ specific key/value pairs:
185185
|**sourcePath** |string| | Specify a source path to remap \"./\" to allow full paths to be used when setting breakpoints in binaries that have relative source paths.
186186
|**sourceMap** |[string[2]]| | Specify an array of path re-mappings. Each element in the array must be a two element array containing a source and destination pathname. Overrides sourcePath.
187187
|**debuggerRoot** | string| |Specify a working directory to use when launching lldb-dap. If the debug information in your executable contains relative paths, this option can be used so that `lldb-dap` can find source files and object files that have relative paths.
188-
|**commandEscapePrefix** | string | | The escape prefix to use for executing regular LLDB commands in the Debug Console, instead of printing variables. Defaults to a back-tick (`\``). If it's an empty string, then all expression in the Debug Console are treated as regular LLDB commands.
188+
|**commandEscapePrefix** | string | | The escape prefix to use for executing regular LLDB commands in the Debug Console, instead of printing variables. Defaults to a backtick. If it's an empty string, then all expression in the Debug Console are treated as regular LLDB commands.
189189
|**customFrameFormat** | string | | If non-empty, stack frames will have descriptions generated based on the provided format. See https://lldb.llvm.org/use/formatting.html for an explanation on format strings for frames. If the format string contains errors, an error message will be displayed on the Debug Console and the default frame names will be used. This might come with a performance cost because debug information might need to be processed to generate the description.
190190
|**customThreadFormat** | string | | Same as `customFrameFormat`, but for threads instead of stack frames.
191191
|**displayExtendedBacktrace**|bool| | Enable language specific extended backtraces.
@@ -227,11 +227,11 @@ the following `lldb-dap` specific key/value pairs:
227227

228228
## Debug Console
229229

230-
The debug console allows printing variables / expressions and executing lldb commands.
231-
By default, lldb-dap tries to auto-detect whether a provided commands is a variable
232-
name / expressions whose values will be printed to the Debug Console or a LLDB command.
233-
To side-step this auto-dection and execute a LLDB command, prefix it with the `\``
234-
character.
230+
The Debug Console allows printing variables / expressions and executing lldb commands.
231+
By default, lldb-dap tries to auto-detect whether a provided command is a variable
232+
name / expression whose values will be printed to the Debug Console or a LLDB command.
233+
To side-step this auto-detection and execute a LLDB command, prefix it with the
234+
`commandEscapePrefix`.
235235

236236
The auto-detection can be disabled using the `lldb-dap repl-mode` command.
237237
The escape character can be adjusted via the `commandEscapePrefix` configuration option.
@@ -272,14 +272,16 @@ Inspect or adjust the behavior of lldb-dap repl evaluation requests. The
272272
supported modes are `variable`, `command` and `auto`.
273273

274274
- `variable` - Variable mode expressions are evaluated in the context of the
275-
current frame. Use a `\`` prefix on the command to run an lldb command.
275+
current frame.
276276
- `command` - Command mode expressions are evaluated as lldb commands, as a
277277
result, values printed by lldb are always stringified representations of the
278278
expression output.
279279
- `auto` - Auto mode will attempt to infer if the expression represents an lldb
280280
command or a variable expression. A heuristic is used to infer if the input
281-
represents a variable or a command. Use a `\`` prefix to ensure an expression
282-
is evaluated as a command.
281+
represents a variable or a command.
282+
283+
In all three modes, you can use the `commandEscapePrefix` to ensure an expression
284+
is evaluated as a command.
283285

284286
The initial repl-mode can be configured with the cli flag `--repl-mode=<mode>`
285287
and may also be adjusted at runtime using the lldb command

0 commit comments

Comments
 (0)