You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+19-3Lines changed: 19 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,21 @@
1
1
# Release Notes
2
2
3
+
# 1.11.0
4
+
5
+
### New
6
+
- Updated bundled LLDB to v19.1.0.
7
+
- The Python module implementing the CodeLLDB Python API is now called `codelldb` (aliased to `debugger` for backward
8
+
compatibility).
9
+
- Python scripts running in the context of CodeLLDB can now read workspace configuration settings stored under
10
+
the `lldb.script` namespace via `codelldb.get_config()`.
11
+
12
+
### Changed
13
+
- To reduce the maintenance burden, support for the Rust language service and custom data formatters in CodeLLDB has
14
+
been removed. The constant breaking changes in LLDB's language service API, along with Rust's evolving internal
15
+
representation of `std::` types, have made it increasingly difficult to maintain these updates. Future versions of
16
+
CodeLLDB will be based on stock LLDB, without the Rust language service. Rust data types will still have partial
17
+
support via the data formatters provided by `rustc`, but custom formatters will no longer be maintained.
18
+
3
19
# 1.10.0
4
20
5
21
## New
@@ -14,12 +30,12 @@
14
30
# 1.9.2
15
31
16
32
## New
17
-
- Implemented [Excluded Callers](MANUAL.md#excluded-callers) feature, similar to the [one in Javascript debugger](https://code.visualstudio.com/updates/v1_64#_javascript-debugging).
33
+
- Implemented [Excluded Callers](MANUAL.md#excluded-callers) feature, similar to the
34
+
[one in Javascript debugger](https://code.visualstudio.com/updates/v1_64#_javascript-debugging).
18
35
- Added [create_webview()](MANUAL.md#webview) Python API, which allows scripts to create and manipulate VSCode Webviews.
19
-
This function supersedes functionality of the older `display_html` API.
36
+
This function supersedes functionality of the older `display_html` API.
Copy file name to clipboardExpand all lines: MANUAL.md
+75-47Lines changed: 75 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@
38
38
39
39
# Starting a New Debug Session
40
40
41
-
To start a debugging session you will need to create a [launch configuration](https://code.visualstudio.com/Docs/editor/debugging#_launch-configurations) for your program. Here's a minimal one:
41
+
To start a debugging session, you will need to create a [launch configuration](https://code.visualstudio.com/Docs/editor/debugging#_launch-configurations) for your program. Here's a minimal one:
42
42
43
43
```javascript
44
44
{
@@ -60,7 +60,7 @@ To start a debugging session you will need to create a [launch configuration](ht
60
60
|**initCommands** |[string]| LLDB commands executed upon debugger startup.
61
61
|**targetCreateCommands**|[string]| LLDB commands executed to create debug target.
62
62
|**preRunCommands** |[string]| LLDB commands executed just before launching/attaching the debuggee.
63
-
|**processCreateCommands**|[string]| LLDB commands executed to created/attach the debuggee process.
63
+
|**processCreateCommands**|[string]| LLDB commands executed to create/attach the debuggee process.
64
64
|**postRunCommands** |[string]| LLDB commands executed just after launching/attaching the debuggee.
65
65
|**exitCommands** |[string]| LLDB commands executed at the end of the debugging session.
66
66
|**expressions** |string| The default expression evaluator type: `simple`, `python` or `native`. See [Expressions](#expressions).
@@ -85,7 +85,7 @@ These attributes are applicable when the "launch" initiation method is selected:
85
85
|**env** |dictionary| Environment variables to set in addition to the ones inherited from the parent process environment (unless LLDB's `target.inherit-env` setting has been set to `false`, in which case the initial process environment is empty). You may refer to existing environment variables using `${env:NAME}` syntax. For example, in order to alter the inherited `PATH` variable, you can do this: `"PATH":"${env:HOME}/bin:${env:PATH}"`.
86
86
|**envFile** |string| Path of the file to read the environment variables from. Note that `env` entries will override `envPath` entries.
87
87
|**stdio** |string ❘[string]❘ dictionary| See [Stdio Redirection](#stdio-redirection).
88
-
|**terminal** |string| Destination for debuggee stdio streams: <ul><li>`console` for DEBUG CONSOLE</li><li>`integrated` (default) for VSCode integrated terminal</li><li>`external` for a new terminal window</li></ul>
88
+
|**terminal** |string| Destination for debuggee's stdio streams: <ul><li>`console` for DEBUG CONSOLE</li><li>`integrated` (default) for VSCode integrated terminal</li><li>`external` for a new terminal window</li></ul>
89
89
|**stopOnEntry** |boolean| Whether to stop debuggee immediately after launching.
90
90
91
91
Operations performed for launch:
@@ -96,7 +96,7 @@ Operations performed for launch:
96
96
- Otherwise, target is created from the binary pointed to by the `program` attribute.
97
97
- Target properties are configured using `args`, `env`, `cwd`, `stdio`, etc, configuration attributes.
98
98
- Breakpoints are created.
99
-
- The `preRunCommands` sequence is executed. These commands may alter debug target configuration (e.g. alter args or env).
99
+
- The `preRunCommands` sequence is executed. These commands may alter debug target configuration (e.g. args or env).
100
100
- The debuggee process is created:
101
101
- If `processCreateCommands` attribute is present, this command sequence is executed. These are expected to have created
102
102
a process corresponding to the debug target.
@@ -127,7 +127,7 @@ These attributes are applicable when the "attach" initiation method is selected:
127
127
|attribute |type ||
128
128
|-------------------|--------|---------|
129
129
|**program** |string |Path of the executable file.
130
-
|**pid** |number |Process id to attach to. **pid** may be omitted, in which case debugger will attempt to locate an already running instance of the program. You may also put `${command:pickProcess}` or `${command:pickMyProcess}` here to choose a process interactively.
130
+
|**pid** |number |Process id to attach to. **pid** may be omitted, in which case debugger will attempt to locate an already running instance of the program. You may also use [`${command:pickProcess}` or `${command:pickMyProcess}`](#pick-process-command) here to choose process interactively.
131
131
|**stopOnEntry** |boolean |Whether to stop the debuggee immediately after attaching.
132
132
|**waitFor** |boolean |Wait for the process to launch.
Also known as [Time travel debugging](https://en.wikipedia.org/wiki/Time_travel_debugging). Provided you use a debugging backend that supports
366
366
[these commands](https://sourceware.org/gdb/onlinedocs/gdb/Packets.html#bc), CodeLLDB be used to control reverse execution and stepping.
367
367
368
-
As of this writing, the only backend known to work is [Mozilla's rr](https://rr-project.org/). The minimum supported version is 5.3.0.
368
+
As of this writing, the only known backend that works is [Mozilla's rr](https://rr-project.org/). The minimum supported version is 5.3.0.
369
369
370
370
There are others mentioned [here](http://www.sourceware.org/gdb/news/reversible.html) and [here](https://github.com/mozilla/rr/wiki/Related-work).
371
371
[QEMU](https://www.qemu.org/) reportedly [supports record/replay](https://github.com/qemu/qemu/blob/master/docs/replay.txt) in full system emulation mode.
@@ -406,8 +406,7 @@ Use custom launch with `target create -c <core path>` command:
406
406
```
407
407
408
408
## Source Path Remapping
409
-
Source path remapping is helpful in cases when program's source code is located in a different
410
-
directory then it was in at build time (for example, if a build server was used).
409
+
Source path remapping is helpful when the program's source code is located in a different directory than it was at build time (for example, if a build server was used).
411
410
412
411
A source map consists of pairs of "from" and "to" path prefixes. When the debugger encounters a source
413
412
file path beginning with one of the "from" prefixes, it will substitute the corresponding "to" prefix
@@ -585,7 +584,7 @@ views](https://lldb.llvm.org/use/varformats.html) of the debuggee variables. Fo
585
584
`std::vector` or comparing `std::string` to a string literal should "just work".
586
585
587
586
The followng features are supported:
588
-
- References to variables: all identifiers are assumed to refer to variables in the debuggee's current stack frame.
587
+
- References to variables: all identifiers are assumed to refer to variables in the debuggee current stack frame.
589
588
The identifiers may be qualified with namespaces and template parameters (e.g. `std::numeric_limits<float>::digits`).
590
589
- Embedded [native expressions](#native-expressions): these must be delimited with `${` and `}`.
591
590
- Literals: integers, floats and strings, `True`, `False`.
@@ -627,42 +626,70 @@ thus they are often not as convenient as "simple" or "python" expressions.
627
626
628
627
## Debugger API
629
628
630
-
CodeLLDB provides extended Python API via the `debugger` module (which is auto-imported into debugger's main script context).
631
-
This module exports the following functions:
632
-
633
-
def **evaluate(expression: `str`, unwrap=False) -> `Value` | `lldb.SBValue`** : Performs dynamic evaluation of [native expressions](#native-expressions) returning instances of [`Value`](#value).
634
-
- **expression**: The expression to evaluate.
635
-
- **unwrap**: Whether to unwrap the result and return it as `lldb.SBValue`.
636
-
637
-
**unwrap(obj: `Value`) -> `lldb.SBValue`** : Extracts an [`lldb.SBValue`](https://lldb.llvm.org/python_api/lldb.SBValue.html) from [`Value`](#value).
638
-
639
-
**wrap(obj: `lldb.SBValue`) -> `Value`** : Wraps [`lldb.SBValue`](https://lldb.llvm.org/python_api/lldb.SBValue.html) in a [`Value`](#value) object.
`Value` objects ([source](adapter/scripts/codelldb/value.py)) are proxy wrappers around [`lldb.SBValue`](https://lldb.llvm.org/python_api/lldb.SBValue.html),
@@ -700,19 +727,18 @@ this configuration entry: `"lldb.adapterEnv": {"LLDB_DEBUGSERVER_PATH": "<lldb-s
700
727
701
728
# Rust Language Support
702
729
703
-
CodeLLDB natively supports visualization of most common Rust data types:
704
-
- Built-in types: tuples, enums, arrays, array and string slices.
705
-
- Standard library types: `Vec`, `String`, `CString`, `OSString`, `Path`, `Cell`, `Rc`, `Arc` and more.
730
+
CodeLLDB will attempt to locate and load LLDB data formatters provided by the Rust toolchain. By default, the configured
731
+
toolchain of your workspace root will be used, however this can be overridden via these configuration settings:
732
+
- **lldb.script.lang.rust.toolchain** - override toolchain name, for example `beta`.
733
+
- **lldb.script.lang.rust.sysroot** - set toolchain sysroot directly, for example `/home/user/.rustup/toolchains/beta-x86_64-unknown-linux-gnu`.
706
734
707
735
To enable this feature, add `"sourceLanguages": ["rust"]` into your launch configuration.
708
736
709
-

710
-
711
737
## Cargo support
712
738
713
739
Several Rust users had pointed out that debugging tests and benchmarks in Cargo-based projects is somewhat
714
740
difficult since names of the output test/bench binary generated by Cargo is not deterministic.
715
-
To cope with this problem, CodeLLDB can query Cargo for a list of its compilation outputs. In order
741
+
To address this problem, CodeLLDB can query Cargo for a list of its compilation outputs. In order
716
742
to use this feature, replace `program` property in your launch configuration with `cargo`:
717
743
```javascript
718
744
{
@@ -805,6 +831,8 @@ These settings specify the default values for launch configuration setting of th
805
831
|**lldb.dereferencePointers**|Whether to show summaries of the pointees instead of numeric values of the pointers themselves.
806
832
|**lldb.suppressMissingSourceFiles**|Suppress VSCode's messages about missing source files (when debug info refers to files not available on the local machine).
807
833
|**lldb.consoleMode** |Controls whether the DEBUG CONSOLE input is by default treated as debugger commands or as expressions to evaluate:<li>`commands` - treat debug console input as debugger commands. In order to evaluate an expression, prefix it with '?' (question mark).",<li>`evaluate` - treat DEBUG CONSOLE input as expressions. In order to execute a debugger command, prefix it with '/cmd ' or '\`' (backtick), <li>`split` - (experimental) use the DEBUG CONSOLE for evaluation of expressions, open a separate terminal for LLDB console.
834
+
|**lldb.script** |Configuration settings provided to Python scripts running in the context of CodeLLDB. These may be read via [`get_config()`](#debugger-api).
0 commit comments