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
lldb-vscode had installation instructions based on creating a folder
inside ~/.vscode/extensions, which no longer works. A different
installation mechanism is needed based on a VSCode command. More can be
read in the contents of this patch.
Closes#63655
@@ -24,52 +26,57 @@ get a full featured debugger with a well defined protocol.
24
26
25
27
# Installation for Visual Studio Code
26
28
27
-
Installing the plug-in involves creating a directory in the `~/.vscode/extensions` folder and copying the package.json file that is in the same directory as this
28
-
documentation into it, and copying to symlinking a lldb-vscode binary into
29
-
the `bin` directory inside the plug-in directory.
30
-
31
-
If you want to make a stand alone plug-in that you can send to others on unix systems:
$ cd ~/.vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
37
-
$ cp /path/to/a/built/lldb-vscode .
38
-
$ cp /path/to/a/built/liblldb.so .
29
+
Installing the plug-in involves creating a directory in any location outside of
30
+
`~/.vscode/extensions`. For example, `~/vscode-lldb` is a valid one. You'll also
31
+
need a subfolder `bin`, e.g. `~/vscode-lldb/bin`. Then copy the `package.json`
32
+
file that is in the same directory as this documentation into it, and symlink
33
+
the `lldb-vscode` binary into the `bin` directory inside the plug-in directory.
34
+
35
+
Finally, on VS Code, execute the command
36
+
`Developer: Install Extension from Location` and pick the folder you just
37
+
created, which would be `~/vscode-lldb` following the example above.
38
+
39
+
If you want to make a stand alone plug-in that you can send to others on UNIX
40
+
systems:
41
+
42
+
```bash
43
+
mkdir -p ~/llvm-org.lldb-vscode-0.1.0/bin
44
+
cp package.json ~/llvm-org.lldb-vscode-0.1.0
45
+
cd~/llvm-org.lldb-vscode-0.1.0/bin
46
+
cp /path/to/a/built/lldb-vscode .
47
+
cp /path/to/a/built/liblldb.so .
39
48
```
40
49
41
-
It is important to note that the directory `~/.vscode/extensions` works for users logged in locally to the machine. If you are remoting into the box using Visual Studio Code's Remote plugins (SSH, WSL, Docker) it will look for extensions on `~/.vscode-server/extensions` only and you will not see your just installed lldb-vscode plug-in. If you want this plugin to be visible to remoting users, you will need to either repeat the process above for the `~/.vscode-server` folder or create a symbolic link from it to `~/.vscode/extensions`:
50
+
If you want to make a stand alone plug-in that you can send to others on macOS
You might need to create additional directories for the `liblldb.so` or
62
+
`LLDB.framework` inside or next to the `bin` folder depending on how the
63
+
[rpath](https://en.wikipedia.org/wiki/Rpath) is set in your `lldb-vscode`
64
+
binary. By default the `Debug` builds of LLDB usually includes
65
+
the current executable directory in the rpath, so these steps should work for
66
+
most people.
67
+
68
+
To create a plug-in that symlinks into your `lldb-vscode` in your build
69
+
directory:
70
+
71
+
```bash
72
+
mkdir -p ~/llvm-org.lldb-vscode-0.1.0/bin
73
+
cp package.json ~/llvm-org.lldb-vscode-0.1.0
74
+
cd~/llvm-org.lldb-vscode-0.1.0/bin
75
+
ln -s /path/to/a/built/lldb-vscode
56
76
```
57
77
58
-
You might need to create additional directories for the `liblldb.so` or `LLDB.framework` inside or next to the `bin` folder depending on how the [rpath](https://en.wikipedia.org/wiki/Rpath) is set in your `lldb-vscode` binary. By default the `Debug` builds of LLDB usually includes
59
-
the current executable directory in the rpath, so these steps should work for most people.
60
-
61
-
To create a plug-in that symlinks into your `lldb-vscode` in your build directory:
$ cd ~/.vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
67
-
$ ln -s /path/to/a/built/lldb-vscode
68
-
```
69
-
70
-
This is handy if you want to debug and develope the `lldb-vscode` executable when adding features or fixing bugs.
71
-
72
-
78
+
This is handy if you want to debug and develope the `lldb-vscode` executable
79
+
when adding features or fixing bugs.
73
80
74
81
# Configurations
75
82
@@ -127,7 +134,6 @@ The JSON configuration file can contain the following `lldb-vscode` specific lau
127
134
|**terminateCommands** |[string]| | LLDB commands executed when the debugging session ends. Commands and command output will be sent to the debugger console when they are executed.
128
135
|**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.
129
136
130
-
131
137
## Example configurations
132
138
133
139
### Launching
@@ -191,7 +197,6 @@ to be launched you can add the "waitFor" key value pair:
191
197
This will work as long as the architecture, vendor and OS supports waiting
192
198
for processes. Currently MacOS is the only platform that supports this.
193
199
194
-
195
200
### Loading a Core File
196
201
197
202
This loads the coredump file `/cores/123.core` associated with the program
@@ -242,12 +247,12 @@ This will launch a server and then request a child debug session for a client.
242
247
Inspect or adjust the behavior of lldb-vscode repl evaluation requests. The
243
248
supported modes are `variable`, `command` and `auto`.
244
249
245
-
*`variable` - Variable mode expressions are evaluated in the context of the
250
+
-`variable` - Variable mode expressions are evaluated in the context of the
246
251
current frame. Use a `\`` prefix on the command to run an lldb command.
247
-
*`command` - Command mode expressions are evaluated as lldb commands, as a
252
+
-`command` - Command mode expressions are evaluated as lldb commands, as a
248
253
result, values printed by lldb are always stringified representations of the
249
254
expression output.
250
-
*`auto` - Auto mode will attempt to infer if the expression represents an lldb
255
+
-`auto` - Auto mode will attempt to infer if the expression represents an lldb
251
256
command or a variable expression. A heuristic is used to infer if the input
252
257
represents a variable or a command. Use a `\`` prefix to ensure an expression
0 commit comments