This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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`
[rpath](https://en.wikipedia.org/wiki/Rpath) is set in your `lldb-dap`
binary. By default the `Debug` builds of LLDB usually includes
the current executable directory in the rpath, so these steps should work for
most people.
To create a plug-in that symlinks into your `lldb-vscode` in your build
To create a plug-in that symlinks into your `lldb-dap` in your build
directory:
```bash
mkdir -p ~/llvm-org.lldb-vscode-0.1.0/bin
cp package.json ~/llvm-org.lldb-vscode-0.1.0
cd~/llvm-org.lldb-vscode-0.1.0/bin
ln -s /path/to/a/built/lldb-vscode
mkdir -p ~/llvm-org.lldb-dap-0.1.0/bin
cp package.json ~/llvm-org.lldb-dap-0.1.0
cd~/llvm-org.lldb-dap-0.1.0/bin
ln -s /path/to/a/built/lldb-dap
```
This is handy if you want to debug and develope the `lldb-vscode` executable
This is handy if you want to debug and develop the `lldb-dap` executable
when adding features or fixing bugs.
# Configurations
Launching to attaching require you to create a [launch configuration](https://code.visualstudio.com/Docs/editor/debugging#_launch-configurations). This file
defines arguments that get passed to `lldb-vscode` and the configuration settings
defines arguments that get passed to `lldb-dap` and the configuration settings
control how the launch or attach happens.
## Launch Configuration Settings
When you launch a program with Visual Studio Code you will need to create a [launch.json](https://code.visualstudio.com/Docs/editor/debugging#_launch-configurations)
file that defines how your program will be run. The JSON configuration file can contain the following `lldb-vscode` specific launch key/value pairs:
file that defines how your program will be run. The JSON configuration file can contain the following `lldb-dap` specific launch key/value pairs:
|parameter |type|req ||
|-------------------|----|:--:|---------|
|**name** |string|Y| A configuration name that will be displayed in the IDE.
|**type** |string|Y| Must be "lldb-vscode".
|**type** |string|Y| Must be "lldb-dap".
|**request** |string|Y| Must be "launch".
|**program** |string|Y| Path to the executable to launch.
|**args** |[string]|| An array of command line argument strings to be passed to the program being launched.
Expand All
@@ -106,7 +107,7 @@ file that defines how your program will be run. The JSON configuration file can
|**exitCommands** |[string]| | LLDB commands executed when the program exits. Commands and command output will be sent to the debugger console when they are executed.
|**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.
|**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.
|**debuggerRoot** | string| |Specify a working directory to use when launching lldb-vscode. If the debug information in your executable contains relative paths, this option can be used so that `lldb-vscode` can find source files and object files that have relative paths.
|**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.
## Attaching Settings
Expand All
@@ -116,12 +117,12 @@ When attaching to a process using LLDB you can attach in a few ways
2. Attach to an existing process by name
3. Attach by name by waiting for the next instance of a process to launch
The JSON configuration file can contain the following `lldb-vscode` specific launch key/value pairs:
The JSON configuration file can contain the following `lldb-dap` specific launch key/value pairs:
|parameter |type |req ||
|-------------------|--------|:--:|---------|
|**name** |string |Y| A configuration name that will be displayed in the IDE.
|**type** |string |Y| Must be "lldb-vscode".
|**type** |string |Y| Must be "lldb-dap".
|**request** |string |Y| Must be "attach".
|**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.
|**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.
Expand All
@@ -143,7 +144,7 @@ adds `FOO=1` and `bar` to the environment:
```javascript
{
"type":"lldb-vscode",
"type":"lldb-dap",
"request":"launch",
"name":"Debug",
"program":"/tmp/a.out",
Expand All
@@ -158,7 +159,7 @@ This will attach to a process `a.out` whose process ID is 123:
```javascript
{
"type":"lldb-vscode",
"type":"lldb-dap",
"request":"attach",
"name":"Attach to PID",
"program":"/tmp/a.out",
Expand All
@@ -175,7 +176,7 @@ above configuration:
```javascript
{
"name":"Attach to Name",
"type":"lldb-vscode",
"type":"lldb-dap",
"request":"attach",
"program":"/tmp/a.out",
}
Expand All
@@ -187,7 +188,7 @@ to be launched you can add the "waitFor" key value pair:
```javascript
{
"name":"Attach to Name (wait)",
"type":"lldb-vscode",
"type":"lldb-dap",
"request":"attach",
"program":"/tmp/a.out",
"waitFor":true
Expand All
@@ -205,7 +206,7 @@ This loads the coredump file `/cores/123.core` associated with the program
```javascript
{
"name":"Load coredump",
"type":"lldb-vscode",
"type":"lldb-dap",
"request":"attach",
"coreFile":"/cores/123.core",
"program":"/tmp/a.out"
Expand All
@@ -221,7 +222,7 @@ locally on port `2345`.
```javascript
{
"name":"Local Debug Server",
"type":"lldb-vscode",
"type":"lldb-dap",
"request":"attach",
"program":"/tmp/a.out",
"attachCommands": ["gdb-remote 2345"],
Expand All
@@ -237,7 +238,7 @@ port `5678` of that other machine.
```javascript
{
"name":"Remote Debug Server",
"type":"lldb-vscode",
"type":"lldb-dap",
"request":"attach",
"program":"/tmp/a.out",
"attachCommands": ["gdb-remote hostname:5678"],
Expand All
@@ -246,12 +247,12 @@ port `5678` of that other machine.
# Custom debugger commands
The `lldb-vscode` tool includes additional custom commands to support the Debug
The `lldb-dap` tool includes additional custom commands to support the Debug
Adapter Protocol features.
## startDebugging
Using the command `lldb-vscode startDebugging` it is possible to trigger a
Using the command `lldb-dap startDebugging` it is possible to trigger a
reverse request to the client requesting a child debug session with the
specified configuration. For example, this can be used to attached to forked or
spawned processes. For more information see
Expand All
@@ -260,7 +261,7 @@ spawned processes. For more information see
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"description": "Custom commands that are executed instead of launching a process. A target will be created with the launch arguments prior to executing these commands. The commands may optionally create a new target and must perform a launch. A valid process must exist after these commands complete or the \"launch\" will fail. Launch the process with \"process launch -s\" to make the process to at the entry point since lldb-vscode will auto resume if necessary.",
"description": "Custom commands that are executed instead of launching a process. A target will be created with the launch arguments prior to executing these commands. The commands may optionally create a new target and must perform a launch. A valid process must exist after these commands complete or the \"launch\" will fail. Launch the process with \"process launch -s\" to make the process to at the entry point since lldb-dap will auto resume if necessary.",
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters