Remove workaround for broken cpptools
This commit is contained in:
parent
0918a72dd9
commit
be26098315
4 changed files with 32 additions and 85 deletions
90
README.md
90
README.md
|
|
@ -628,64 +628,6 @@ Current tested with the following debug adapters.
|
||||||
|
|
||||||
* C++: [vscode-cpptools](https://github.com/Microsoft/vscode-cpptools)
|
* C++: [vscode-cpptools](https://github.com/Microsoft/vscode-cpptools)
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
***NOTE FOR macOS USERS***: Currently VSCode cpptools does *not* work on macOS
|
|
||||||
out of the box.
|
|
||||||
See [this issue]( https://github.com/microsoft/vscode-cpptools/issues/3829)
|
|
||||||
for the full details.
|
|
||||||
|
|
||||||
To resolve it:
|
|
||||||
|
|
||||||
* Install [my build](https://github.com/puremourning/lldb-mi/releases) of
|
|
||||||
`lldb-mi`. Instructions
|
|
||||||
[here](https://github.com/microsoft/vscode-cpptools/issues/3829#issuecomment-578454043).
|
|
||||||
* Add the following to the `configuration` section of your `.vimspector.json`
|
|
||||||
(below):
|
|
||||||
|
|
||||||
```
|
|
||||||
{
|
|
||||||
"configurations": {
|
|
||||||
"<name>: Launch": {
|
|
||||||
"adapter": "vscode-cpptools",
|
|
||||||
"configuration": {
|
|
||||||
"miDebuggerPath": "/path/to/my/build/of/lldb-mi",
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
An alternative is to to use `lldb-vscode`, which comes with llvm. Here's how:
|
|
||||||
|
|
||||||
* Install llvm with HomeBrew: `brew install llvm`
|
|
||||||
* Create a file named
|
|
||||||
`/path/to/vimspector/gadgets/macos/.gadgets.d/lldb-vscode.json`:
|
|
||||||
|
|
||||||
```json
|
|
||||||
|
|
||||||
{
|
|
||||||
"adapters": {
|
|
||||||
"lldb-vscode": {
|
|
||||||
"variables": {
|
|
||||||
"LLVM": {
|
|
||||||
"shell": "brew --prefix llvm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"attach": {
|
|
||||||
"pidProperty": "pid",
|
|
||||||
"pidSelect": "ask"
|
|
||||||
},
|
|
||||||
"command": [
|
|
||||||
"${LLVM}/bin/lldb-vscode"
|
|
||||||
],
|
|
||||||
"env": {
|
|
||||||
"LLDB_LAUNCH_FLAG_LAUNCH_IN_TTY": "YES"
|
|
||||||
},
|
|
||||||
"name": "lldb"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Example `.vimspector.json` (works with both `vscode-cpptools` and `lldb-vscode`.
|
Example `.vimspector.json` (works with both `vscode-cpptools` and `lldb-vscode`.
|
||||||
For `lldb-vscode` replace the name of the adapter with `lldb-vscode`:
|
For `lldb-vscode` replace the name of the adapter with `lldb-vscode`:
|
||||||
|
|
@ -722,6 +664,38 @@ For `lldb-vscode` replace the name of the adapter with `lldb-vscode`:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
An alternative is to to use `lldb-vscode`, which comes with llvm. Here's how:
|
||||||
|
|
||||||
|
* Install llvm with HomeBrew: `brew install llvm`
|
||||||
|
* Create a file named
|
||||||
|
`/path/to/vimspector/gadgets/macos/.gadgets.d/lldb-vscode.json`:
|
||||||
|
|
||||||
|
```json
|
||||||
|
|
||||||
|
{
|
||||||
|
"adapters": {
|
||||||
|
"lldb-vscode": {
|
||||||
|
"variables": {
|
||||||
|
"LLVM": {
|
||||||
|
"shell": "brew --prefix llvm"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"attach": {
|
||||||
|
"pidProperty": "pid",
|
||||||
|
"pidSelect": "ask"
|
||||||
|
},
|
||||||
|
"command": [
|
||||||
|
"${LLVM}/bin/lldb-vscode"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"LLDB_LAUNCH_FLAG_LAUNCH_IN_TTY": "YES"
|
||||||
|
},
|
||||||
|
"name": "lldb"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Python
|
## Python
|
||||||
|
|
||||||
* Python: [debugpy][]
|
* Python: [debugpy][]
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,6 @@ stages:
|
||||||
env:
|
env:
|
||||||
VIMSPECTOR_MIMODE: gdb
|
VIMSPECTOR_MIMODE: gdb
|
||||||
VIMSPECTOR_TEST_STDOUT: true
|
VIMSPECTOR_TEST_STDOUT: true
|
||||||
VIMSPECTOR_MI_DEBUGGER: gdb
|
|
||||||
|
|
||||||
- bash: ./make_package linux $(Build.SourceVersion)
|
- bash: ./make_package linux $(Build.SourceVersion)
|
||||||
displayName: 'Package'
|
displayName: 'Package'
|
||||||
|
|
@ -102,25 +101,11 @@ stages:
|
||||||
- bash: vim --version
|
- bash: vim --version
|
||||||
displayName: 'Print vim version information'
|
displayName: 'Print vim version information'
|
||||||
|
|
||||||
- bash: |
|
|
||||||
VERSION=66e8ed9af1812ca0bb6cfcc7023a35742e1bd323
|
|
||||||
BUILD=1092
|
|
||||||
set -ex
|
|
||||||
mkdir -p lldb-mi
|
|
||||||
pushd lldb-mi
|
|
||||||
curl -LO https://github.com/puremourning/lldb-mi/releases/download/${BUILD}/lldb-mi-${VERSION}.tar.gz
|
|
||||||
tar zxvf lldb-mi-${VERSION}.tar.gz
|
|
||||||
cp usr/local/bin/lldb-mi /usr/local/bin
|
|
||||||
popd
|
|
||||||
displayName: 'Install lldb-mi'
|
|
||||||
|
|
||||||
- bash: ./run_tests
|
- bash: ./run_tests
|
||||||
displayName: 'Run the tests'
|
displayName: 'Run the tests'
|
||||||
env:
|
env:
|
||||||
VIMSPECTOR_MIMODE: lldb
|
VIMSPECTOR_MIMODE: lldb
|
||||||
VIMSPECTOR_TEST_STDOUT: true
|
VIMSPECTOR_TEST_STDOUT: true
|
||||||
VIMSPECTOR_MI_DEBUGGER: "/usr/local/bin/lldb-mi"
|
|
||||||
LLDB_DEBUGSERVER_PATH: "/Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Resources/debugserver"
|
|
||||||
|
|
||||||
- bash: ./make_package macos $(Build.SourceVersion)
|
- bash: ./make_package macos $(Build.SourceVersion)
|
||||||
displayName: 'Package'
|
displayName: 'Package'
|
||||||
|
|
|
||||||
11
run_tests
11
run_tests
|
|
@ -23,18 +23,8 @@ fi
|
||||||
if [ -z "$VIMSPECTOR_MIMODE" ]; then
|
if [ -z "$VIMSPECTOR_MIMODE" ]; then
|
||||||
if which lldb >/dev/null 2>&1; then
|
if which lldb >/dev/null 2>&1; then
|
||||||
export VIMSPECTOR_MIMODE=lldb
|
export VIMSPECTOR_MIMODE=lldb
|
||||||
|
|
||||||
if [ -z "${VIMSPECTOR_MI_DEBUGGER}" ]; then
|
|
||||||
if which lldb-mi >/dev/null 2>&1; then
|
|
||||||
export VIMSPECTOR_MI_DEBUGGER=lldb-mi
|
|
||||||
else
|
|
||||||
echo "Couldn't guess VIMSPECTOR_MI_DEBUGGER. Need lldb-mi in path"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
elif which gdb >/dev/null 2>&1; then
|
elif which gdb >/dev/null 2>&1; then
|
||||||
export VIMSPECTOR_MIMODE=gdb
|
export VIMSPECTOR_MIMODE=gdb
|
||||||
export VIMSPECTOR_MI_DEBUGGER=gdb
|
|
||||||
else
|
else
|
||||||
echo "Couldn't guess VIMSPECTOR_MIMODE. Need lldb or gdb in path"
|
echo "Couldn't guess VIMSPECTOR_MIMODE. Need lldb or gdb in path"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -43,7 +33,6 @@ fi
|
||||||
|
|
||||||
echo "Testing with:"
|
echo "Testing with:"
|
||||||
echo " * VIMSPECTOR_MIMODE=$VIMSPECTOR_MIMODE"
|
echo " * VIMSPECTOR_MIMODE=$VIMSPECTOR_MIMODE"
|
||||||
echo " * VIMSPECTOR_MI_DEBUGGER=${VIMSPECTOR_MI_DEBUGGER}"
|
|
||||||
|
|
||||||
echo "%SETUP - Building test programs..."
|
echo "%SETUP - Building test programs..."
|
||||||
set -e
|
set -e
|
||||||
|
|
|
||||||
1
tests/testdata/cpp/simple/.vimspector.json
vendored
1
tests/testdata/cpp/simple/.vimspector.json
vendored
|
|
@ -13,7 +13,6 @@
|
||||||
"stopAtEntry": true,
|
"stopAtEntry": true,
|
||||||
"stopOnEntry": true,
|
"stopOnEntry": true,
|
||||||
"MImode": "${VIMSPECTOR_MIMODE}",
|
"MImode": "${VIMSPECTOR_MIMODE}",
|
||||||
"miDebuggerPath": "${VIMSPECTOR_MI_DEBUGGER}",
|
|
||||||
"logging": {
|
"logging": {
|
||||||
"engineLogging": true
|
"engineLogging": true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue