Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3f458cdc7 | ||
|
|
7723d58cf8 |
59 changed files with 1228 additions and 4908 deletions
6
.github/ISSUE_TEMPLATE/bug_report.md
vendored
6
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
|
@ -57,12 +57,6 @@ discussing on Gitter rather than raising an issue.
|
|||
* Version of Vimspector: (e.g. output of `git rev-parse HEAD` if cloned or the
|
||||
name of the tarball used to install otherwise)
|
||||
|
||||
* Output of `:VimspectorDebugInfo`
|
||||
|
||||
```
|
||||
paste here
|
||||
```
|
||||
|
||||
* Output of `vim --version` or `nvim --version`
|
||||
|
||||
```
|
||||
|
|
|
|||
20
.github/workflows/build.yaml
vendored
20
.github/workflows/build.yaml
vendored
|
|
@ -13,7 +13,7 @@ defaults:
|
|||
|
||||
jobs:
|
||||
PythonLint:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-16.04
|
||||
container: 'puremourning/vimspector:test'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
|
@ -22,7 +22,7 @@ jobs:
|
|||
- name: 'Run flake8'
|
||||
run: '$HOME/.local/bin/flake8 python3/ *.py'
|
||||
VimscriptLint:
|
||||
runs-on: 'ubuntu-18.04'
|
||||
runs-on: 'ubuntu-16.04'
|
||||
container: 'puremourning/vimspector:test'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
|
@ -32,7 +32,7 @@ jobs:
|
|||
run: $HOME/.local/bin/vint autoload/ compiler/ plugin/ tests/ syntax/
|
||||
|
||||
Linux:
|
||||
runs-on: 'ubuntu-18.04'
|
||||
runs-on: 'ubuntu-16.04'
|
||||
container:
|
||||
image: 'puremourning/vimspector:test'
|
||||
options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined
|
||||
|
|
@ -111,16 +111,6 @@ jobs:
|
|||
path: gadgets/macos/download
|
||||
name: Cache gadgets
|
||||
|
||||
- name: 'Install .NET Core SDK 3.1'
|
||||
uses: actions/setup-dotnet@v1.7.2
|
||||
with:
|
||||
dotnet-version: 3.1
|
||||
|
||||
- uses: maxim-lobanov/setup-xcode@v1
|
||||
with:
|
||||
xcode-version: ^11
|
||||
name: "Switch to xcode 11 because of .NET debugging bug"
|
||||
|
||||
- run: vim --version
|
||||
name: 'Print vim version information'
|
||||
|
||||
|
|
@ -153,10 +143,10 @@ jobs:
|
|||
# if: failure()
|
||||
# with:
|
||||
# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
|
||||
# SSH_PASS: ${{ secrets.SSH_PASS }} # [V]imspector
|
||||
# SSH_PASS: ${{ secrets.SSH_PASS }}
|
||||
|
||||
PublishRelease:
|
||||
runs-on: 'ubuntu-18.04'
|
||||
runs-on: 'ubuntu-16.04'
|
||||
needs:
|
||||
- Linux
|
||||
- MacOS
|
||||
|
|
|
|||
27
.github/workflows/lock_old_issues.yaml
vendored
27
.github/workflows/lock_old_issues.yaml
vendored
|
|
@ -1,27 +0,0 @@
|
|||
name: "Lock Old Issues"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lock:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dessant/lock-threads@v2
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
issue-lock-inactive-days: '60'
|
||||
# issue-exclude-created-before: ''
|
||||
# issue-exclude-labels: ''
|
||||
# issue-lock-labels: ''
|
||||
# issue-lock-comment: ''
|
||||
# issue-lock-reason: 'resolved'
|
||||
# pr-lock-inactive-days: '365'
|
||||
# pr-exclude-created-before: ''
|
||||
# pr-exclude-labels: ''
|
||||
# pr-lock-labels: ''
|
||||
# pr-lock-comment: ''
|
||||
# pr-lock-reason: 'resolved'
|
||||
process-only: 'issues'
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -20,4 +20,3 @@ support/test/csharp/*.exe*
|
|||
configurations/
|
||||
venv/
|
||||
test-base/
|
||||
tags
|
||||
|
|
|
|||
|
|
@ -9,8 +9,9 @@ pull_request_rules:
|
|||
# CI https://doc.mergify.io/conditions.html#github-actions
|
||||
- status-success=PythonLint
|
||||
- status-success=VimscriptLint
|
||||
- status-success=Linux
|
||||
- status-success=MacOS
|
||||
|
||||
|
||||
actions: &merge-actions
|
||||
merge:
|
||||
method: merge
|
||||
|
|
|
|||
|
|
@ -42,17 +42,7 @@ def Settings( **kwargs ):
|
|||
return {
|
||||
'sys_path': [
|
||||
p.join( PATH_TO_THIS_DIR, 'python3' )
|
||||
],
|
||||
'ls': {
|
||||
'python': {
|
||||
'analysis': {
|
||||
'extraPaths': [
|
||||
p.join( PATH_TO_THIS_DIR, 'python3' ),
|
||||
],
|
||||
'useLibraryCodeForTypes': True
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
if IgnoreExtraConf:
|
||||
|
|
|
|||
|
|
@ -46,23 +46,6 @@ The GitHub issue tracker is for *bug reports* and *features requests* for the
|
|||
Vimspector project, and on-topic comments and follow-ups to them. It is not for
|
||||
general discussion, general support or for any other purpose.
|
||||
|
||||
Please **search the issue tracker for similar issues** before creating a new
|
||||
one. There's no point in duplication; if an existing open issue addresses your
|
||||
problem, please comment there instead of creating a duplicate. However, if the
|
||||
issue you found is **closed as resolved** (e.g. with a PR or the original user's
|
||||
problem was resolved), raise a **new issue**, because you've found a new
|
||||
problem. Reference the original issue if you think that's useful information.
|
||||
|
||||
Closed issues which have been inactive for 60 days will be locked, this helps to
|
||||
keep discussions focussed. If you believe you are still experiencing an issue
|
||||
which has been closed, please raise a new issue, completing the issue template.
|
||||
|
||||
If you do find a similar _open_ issue, **don't just post 'me too' or similar**
|
||||
responses. This almost never helps resolve the issue, and just causes noise for
|
||||
the maintainers. Only post if it will aid the maintainers in solving the issue;
|
||||
if there are existing diagnostics requested in the thread, perform
|
||||
them and post the results.
|
||||
|
||||
Please do not be offended if your Issue or comment is closed or hidden, for any
|
||||
of the following reasons:
|
||||
|
||||
|
|
@ -70,7 +53,6 @@ of the following reasons:
|
|||
* The issue or comment is off-topic
|
||||
* The issue does not represent a Vimspector bug or feature request
|
||||
* The issue cannot be reasonably reproduced using the minimal vimrc
|
||||
* The issue is a duplicate of an existing issue
|
||||
* etc.
|
||||
|
||||
Issue titles are important. It's not usually helpful to write a title like
|
||||
|
|
|
|||
304
README.md
304
README.md
|
|
@ -3,7 +3,7 @@
|
|||
For a tutorial and usage overview, take a look at the
|
||||
[Vimspector website][website].
|
||||
|
||||
For detailed explanation of the `.vimspector.json` format, see the
|
||||
For detailed explanatin of the `.vimspector.json` format, see the
|
||||
[reference guide][vimspector-ref].
|
||||
|
||||
 [](https://gitter.im/vimspector/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
|
|
@ -59,16 +59,15 @@ For detailed explanation of the `.vimspector.json` format, see the
|
|||
* [Console autocompletion](#console-autocompletion)
|
||||
* [Log View](#log-view)
|
||||
* [Closing debugger](#closing-debugger)
|
||||
* [Terminate debuggee](#terminate-debuggee)
|
||||
* [Debug profile configuration](#debug-profile-configuration)
|
||||
* [C, C++, Rust, etc.](#c-c-rust-etc)
|
||||
* [Data visualization / pretty printing](#data-visualization--pretty-printing)
|
||||
* [C++ Remote debugging](#c-remote-debugging)
|
||||
* [C++ Remote launch and attach](#c-remote-launch-and-attach)
|
||||
* [C, C , Rust, etc.](#c-c-rust-etc)
|
||||
* [C Remote debugging](#c-remote-debugging)
|
||||
* [C Remote launch and attach](#c-remote-launch-and-attach)
|
||||
* [Rust](#rust)
|
||||
* [Python](#python)
|
||||
* [Python Remote Debugging](#python-remote-debugging)
|
||||
* [Python Remote launch and attach](#python-remote-launch-and-attach)
|
||||
* [Legacy: vscode-python](#legacy-vscode-python)
|
||||
* [TCL](#tcl)
|
||||
* [C♯](#c)
|
||||
* [Go](#go)
|
||||
|
|
@ -77,7 +76,6 @@ For detailed explanation of the `.vimspector.json` format, see the
|
|||
* [Debug cli application](#debug-cli-application)
|
||||
* [JavaScript, TypeScript, etc.](#javascript-typescript-etc)
|
||||
* [Java](#java)
|
||||
* [Hot code replace](#hot-code-replace)
|
||||
* [Usage with YouCompleteMe](#usage-with-youcompleteme)
|
||||
* [Other LSP clients](#other-lsp-clients)
|
||||
* [Lua](#lua)
|
||||
|
|
@ -93,14 +91,14 @@ For detailed explanation of the `.vimspector.json` format, see the
|
|||
* [Example](#example)
|
||||
* [FAQ](#faq)
|
||||
|
||||
<!-- Added by: ben, at: Fri 19 Mar 2021 22:57:28 GMT -->
|
||||
<!-- Added by: ben, at: Sun 21 Feb 2021 21:15:32 GMT -->
|
||||
|
||||
<!--te-->
|
||||
|
||||
# Features and Usage
|
||||
|
||||
The plugin is a capable Vim graphical debugger for multiple languages.
|
||||
It's mostly tested for C++, Python and TCL, but in theory supports any
|
||||
It's mostly tested for c++, python and TCL, but in theory supports any
|
||||
language that Visual Studio Code supports (but see caveats).
|
||||
|
||||
The [Vimspector website][website] has an overview of the UI, along with basic
|
||||
|
|
@ -145,24 +143,23 @@ runtime dependencies). They are categorised by their level of support:
|
|||
* `Supported` : Fully supported, frequently used and manually tested
|
||||
* `Experimental`: Working, but not frequently used and rarely tested
|
||||
* `Legacy`: No longer supported, please migrate your config
|
||||
* `Retired`: No longer included or supported.
|
||||
|
||||
| Language | Status | Switch (for `install_gadget.py`) | Adapter (for `:VimspectorInstall`) | Dependencies |
|
||||
|--------------------|-----------|----------------------------------|------------------------------------|--------------------------------------------|
|
||||
| C, C++, Rust etc. | Tested | `--all` or `--enable-c` (or cpp) | vscode-cpptools | mono-core |
|
||||
| Rust, C, C++, etc. | Supported | `--force-enable-rust` | CodeLLDB | Python 3 |
|
||||
| Python | Tested | `--all` or `--enable-python` | debugpy | Python 2.7 or Python 3 |
|
||||
| Go | Tested | `--enable-go` | vscode-go | Node, Go, [Delve][] |
|
||||
| TCL | Supported | `--all` or `--enable-tcl` | tclpro | TCL 8.5 |
|
||||
| Bourne Shell | Supported | `--all` or `--enable-bash` | vscode-bash-debug | Bash v?? |
|
||||
| Lua | Supported | `--all` or `--enable-lua` | local-lua-debugger-vscode | Node >=12.13.0, Npm, Lua interpreter |
|
||||
| Node.js | Supported | `--force-enable-node` | vscode-node-debug2 | 6 < Node < 12, Npm |
|
||||
| Javascript | Supported | `--force-enable-chrome` | debugger-for-chrome | Chrome |
|
||||
| Java | Supported | `--force-enable-java ` | vscode-java-debug | Compatible LSP plugin (see [later](#java)) |
|
||||
| C# (dotnet core) | Tested | `--force-enable-csharp` | netcoredbg | DotNet core |
|
||||
| F#, VB, etc. | Supported | `--force-enable-[fsharp,vbnet]` | `, `--force-enable-vbnet` | netcoredbg | DotNet core |
|
||||
| C# (mono) | _Retired_ | N/A | N/A | N/A |
|
||||
| Python.legacy | _Retired_ | N/A | N/A | N/A |
|
||||
| Language | Status | Switch (for `install_gadget.py`) | Adapter (for `:VimspectorInstall`) | Dependencies |
|
||||
|--------------------|--------------|------------------------------------|------------------------------------|--------------------------------------------|
|
||||
| C, C++, Rust etc. | Tested | `--all` or `--enable-c` (or cpp) | vscode-cpptools | mono-core |
|
||||
| Rust, C, C++, etc. | Supported | `--force-enable-rust` | CodeLLDB | Python 3 |
|
||||
| Python | Tested | `--all` or `--enable-python` | debugpy | Python 2.7 or Python 3 |
|
||||
| Go | Tested | `--enable-go` | vscode-go | Go, [Delve][] |
|
||||
| TCL | Supported | `--all` or `--enable-tcl` | tclpro | TCL 8.5 |
|
||||
| Bourne Shell | Supported | `--all` or `--enable-bash` | vscode-bash-debug | Bash v?? |
|
||||
| Lua | Supported | `--all` or `--enable-lua` | local-lua-debugger-vscode | Node >=12.13.0, Npm, Lua interpreter |
|
||||
| Node.js | Supported | `--force-enable-node` | vscode-node-debug2 | 6 < Node < 12, Npm |
|
||||
| Javascript | Supported | `--force-enable-chrome` | debugger-for-chrome | Chrome |
|
||||
| Java | Supported | `--force-enable-java ` | vscode-java-debug | Compatible LSP plugin (see [later](#java)) |
|
||||
| C# (dotnet core) | Experimental | `--force-enable-csharp` | netcoredbg | DotNet core |
|
||||
| C# (mono) | Experimental | `--force-enable-csharp` | vscode-mono-debug | Mono |
|
||||
| F#, VB, etc. | Experimental | `--force-enable-fsharp` (or vbnet) | netcoredbg | DotNet core |
|
||||
| Python.legacy | Legacy | `--force-enable-python.legacy` | vscode-python | Node 10, Python 2.7 or Python 3 |
|
||||
|
||||
## Other languages
|
||||
|
||||
|
|
@ -291,7 +288,7 @@ If you just want to try out vimspector without changing your vim config, there
|
|||
are example projects for a number of languages in `support/test`, including:
|
||||
|
||||
* Python (`support/test/python/simple_python`)
|
||||
* Go (`support/test/go/hello_world` and `support/test/go/name-starts-with-vowel`)
|
||||
* Go (`support/test/go/hello_world`)
|
||||
* Nodejs (`support/test/node/simple`)
|
||||
* Chrome (`support/test/chrome/`)
|
||||
* etc.
|
||||
|
|
@ -527,6 +524,13 @@ Example:
|
|||
"${gadgetDir}/vscode-cpptools/debugAdapters/OpenDebugAD7"
|
||||
],
|
||||
"name": "cppdbg"
|
||||
},
|
||||
"vscode-python": {
|
||||
"command": [
|
||||
"node",
|
||||
"${gadgetDir}/vscode-python/out/client/debugger/debugAdapter/main.js"
|
||||
],
|
||||
"name": "vscode-python"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -652,23 +656,18 @@ personal and so you should work out what you like and use vim's powerful mapping
|
|||
features to set your own mappings. To that end, Vimspector defines the following
|
||||
`<Plug>` mappings:
|
||||
|
||||
| Mapping | Function | API |
|
||||
| --- | --- | --- |
|
||||
| `<Plug>VimspectorContinue` | When debugging, continue. Otherwise start debugging. | `vimspector#Continue()` |
|
||||
| `<Plug>VimspectorStop` | Stop debugging. | `vimspector#Stop()` |
|
||||
| `<Plug>VimpectorRestart` | Restart debugging with the same configuration. | `vimspector#Restart()` |
|
||||
| `<Plug>VimspectorPause` | Pause debuggee. | `vimspector#Pause()` |
|
||||
| `<Plug>VimspectorToggleBreakpoint` | Toggle line breakpoint on the current line. | `vimspector#ToggleBreakpoint()` |
|
||||
| `<Plug>VimspectorToggleConditionalBreakpoint` | Toggle conditional line breakpoint on the current line. | `vimspector#ToggleBreakpoint( { trigger expr, hit count expr } )` |
|
||||
| `<Plug>VimspectorAddFunctionBreakpoint` | Add a function breakpoint for the expression under cursor | `vimspector#AddFunctionBreakpoint( '<cexpr>' )` |
|
||||
| `<Plug>VimspectorRunToCursor` | Run to Cursor | `vimspector#RunToCursor()` |
|
||||
| `<Plug>VimspectorStepOver` | Step Over | `vimspector#StepOver()` |
|
||||
| `<Plug>VimspectorStepInto` | Step Into | `vimspector#StepInto()` |
|
||||
| `<Plug>VimspectorStepOut` | Step out of current function scope | `vimspector#StepOut()` |
|
||||
| `<Plug>VimspectorUpFrame` | Move up a frame in the current call stack | `vimspector#UpFrame()` |
|
||||
| `<Plug>VimspectorDownFrame` | Move down a frame in the current call stack | `vimspector#DownFrame()` |
|
||||
| `<Plug>VimspectorBalloonEval` | Evaluate expression under cursor (or visual) in popup | *internal* |
|
||||
|
||||
* `<Plug>VimspectorContinue`
|
||||
* `<Plug>VimspectorStop`
|
||||
* `<Plug>VimspectorRestart`
|
||||
* `<Plug>VimspectorPause`
|
||||
* `<Plug>VimspectorToggleBreakpoint`
|
||||
* `<Plug>VimspectorToggleConditionalBreakpoint`
|
||||
* `<Plug>VimspectorAddFunctionBreakpoint`
|
||||
* `<Plug>VimspectorStepOver`
|
||||
* `<Plug>VimspectorStepInto`
|
||||
* `<Plug>VimspectorStepOut`
|
||||
* `<Plug>VimspectorRunToCursor`
|
||||
* `<Plug>VimspectorBalloonEval`
|
||||
|
||||
These map roughly 1-1 with the API functions below.
|
||||
|
||||
|
|
@ -696,17 +695,17 @@ loading vimspector**:
|
|||
let g:vimspector_enable_mappings = 'VISUAL_STUDIO'
|
||||
```
|
||||
|
||||
| Key | Mapping | Function
|
||||
| --- | --- | ---
|
||||
| `F5` | `<Plug>VimspectorContinue` | When debugging, continue. Otherwise start debugging.
|
||||
| `Shift F5` | `<Plug>VimspectorStop` | Stop debugging.
|
||||
| `Ctrl Shift F5` | `<Plug>VimspectorRestart` | Restart debugging with the same configuration.
|
||||
| `F6` | `<Plug>VimspectorPause` | Pause debuggee.
|
||||
| `F9` | `<Plug>VimspectorToggleBreakpoint` | Toggle line breakpoint on the current line.
|
||||
| `Shift F9` | `<Plug>VimspectorAddFunctionBreakpoint` | Add a function breakpoint for the expression under cursor
|
||||
| `F10` | `<Plug>VimspectorStepOver` | Step Over
|
||||
| `F11` | `<Plug>VimspectorStepInto` | Step Into
|
||||
| `Shift F11` | `<Plug>VimspectorStepOut` | Step out of current function scope
|
||||
| Key | Function | API |
|
||||
| --- | --- | --- |
|
||||
| `F5` | When debugging, continue. Otherwise start debugging. | `vimspector#Continue()` |
|
||||
| `Shift F5` | Stop debugging. | `vimspector#Stop()` |
|
||||
| `Ctrl Shift F5` | Restart debugging with the same configuration. | `vimspector#Restart()` |
|
||||
| `F6` | Pause debuggee. | `vimspector#Pause()` |
|
||||
| `F9` | Toggle line breakpoint on the current line. | `vimspector#ToggleBreakpoint()` |
|
||||
| `Shift F9` | Add a function breakpoint for the expression under cursor | `vimspector#AddFunctionBreakpoint( '<cexpr>' )` |
|
||||
| `F10` | Step Over | `vimspector#StepOver()` |
|
||||
| `F11` | Step Into | `vimspector#StepInto()` |
|
||||
| `Shift F11` | Step out of current function scope | `vimspector#StepOut()` |
|
||||
|
||||
## Human Mode
|
||||
|
||||
|
|
@ -721,19 +720,20 @@ loading vimspector**:
|
|||
let g:vimspector_enable_mappings = 'HUMAN'
|
||||
```
|
||||
|
||||
| Key | Mapping | Function
|
||||
| --- | --- | ---
|
||||
| `F5` | `<Plug>VimspectorContinue` | When debugging, continue. Otherwise start debugging.
|
||||
| `F3` | `<Plug>VimspectorStop` | Stop debugging.
|
||||
| `F4` | `<Plug>VimspectorRestart` | Restart debugging with the same configuration.
|
||||
| `F6` | `<Plug>VimspectorPause` | Pause debuggee.
|
||||
| `F9` | `<Plug>VimspectorToggleBreakpoint` | Toggle line breakpoint on the current line.
|
||||
| `<leader>F9` | `<Plug>VimspectorToggleConditionalBreakpoint` | Toggle conditional line breakpoint on the current line.
|
||||
| `F8` | `<Plug>VimspectorAddFunctionBreakpoint` | Add a function breakpoint for the expression under cursor
|
||||
| `<leader>F8` | `<Plug>VimspectorRunToCursor` | Run to Cursor
|
||||
| `F10` | `<Plug>VimspectorStepOver` | Step Over
|
||||
| `F11` | `<Plug>VimspectorStepInto` | Step Into
|
||||
| `F12` | `<Plug>VimspectorStepOut` | Step out of current function scope
|
||||
| Key | Function | API |
|
||||
| --- | --- | --- |
|
||||
| `F5` | When debugging, continue. Otherwise start debugging. | `vimspector#Continue()` |
|
||||
| `<Leader>F5` | Start debugging, do not default the debug profile | `vimspector#Launch( v:true )` |
|
||||
| `F3` | Stop debugging. | `vimspector#Stop()` |
|
||||
| `F4` | Restart debugging with the same configuration. | `vimspector#Restart()` |
|
||||
| `F6` | Pause debuggee. | `vimspector#Pause()` |
|
||||
| `F9` | Toggle line breakpoint on the current line. | `vimspector#ToggleBreakpoint()` |
|
||||
| `<leader>F9` | Toggle conditional line breakpoint on the current line. | `vimspector#ToggleBreakpoint( { trigger expr, hit count expr } )` |
|
||||
| `F8` | Add a function breakpoint for the expression under cursor | `vimspector#AddFunctionBreakpoint( '<cexpr>' )` |
|
||||
| `<leader>F8` | Run to Cursor | `vimspector#RunToCursor()` |
|
||||
| `F10` | Step Over | `vimspector#StepOver()` |
|
||||
| `F11` | Step Into | `vimspector#StepInto()` |
|
||||
| `F12` | Step out of current function scope | `vimspector#StepOut()` |
|
||||
|
||||
In addition, I recommend adding a mapping to `<Plug>VimspectorBalloonEval`, in
|
||||
normal and visual modes, for example:
|
||||
|
|
@ -747,12 +747,9 @@ nmap <Leader>di <Plug>VimspectorBalloonEval
|
|||
xmap <Leader>di <Plug>VimspectorBalloonEval
|
||||
```
|
||||
|
||||
You may also wish to add mappings for up/down the stack, for example:
|
||||
|
||||
```viml
|
||||
nmap <LocalLeader><F11> <Plug>VimspectorUpFrame
|
||||
nmap <LocalLeader><F12> <Plug>VimspectorDownFrame
|
||||
```
|
||||
If you would like to have custom mappings, or mappings active only while
|
||||
debugging, then take a look at the
|
||||
[customisation sectoin](#custom-mappings-while-debugging).
|
||||
|
||||
# Usage and API
|
||||
|
||||
|
|
@ -1008,8 +1005,6 @@ be changed manually to "switch to" that thread.
|
|||
to set the "focussed" thread to the currently selected one. If the selected
|
||||
line is a stack frame, set the focussed thread to the thread of that frame and
|
||||
jump to that frame in the code window.
|
||||
* The current frame when a breakpoint is hit or if manuall jumping is also
|
||||
highlighted.
|
||||
|
||||

|
||||
|
||||
|
|
@ -1071,8 +1066,6 @@ information when something goes wrong that's not a Vim traceback.
|
|||
If you just want to see the Vimspector log file, use `:VimspectorToggleLog`,
|
||||
which will tail it in a little window (doesn't work on Windows).
|
||||
|
||||
You can see some debugging info with `:VimspectorDebugInfo`
|
||||
|
||||
## Closing debugger
|
||||
|
||||
To close the debugger, use:
|
||||
|
|
@ -1177,38 +1170,6 @@ licensing.
|
|||
}
|
||||
```
|
||||
|
||||
### Data visualization / pretty printing
|
||||
|
||||
Depending on the backend you need to enable pretty printing of complex types manually.
|
||||
|
||||
* LLDB: Pretty printing is enabled by default
|
||||
|
||||
* GDB: To enable gdb pretty printers, consider the snippet below.
|
||||
It is not enough to have `set print pretty on` in your .gdbinit!
|
||||
|
||||
```
|
||||
{
|
||||
"configurations": {
|
||||
"Launch": {
|
||||
"adapter": "vscode-cpptools",
|
||||
"configuration": {
|
||||
"request": "launch",
|
||||
"program": "<path to binary>",
|
||||
...
|
||||
"MIMode": "gdb"
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### C++ Remote debugging
|
||||
|
||||
The cpptools documentation describes how to attach cpptools to gdbserver using
|
||||
|
|
@ -1294,6 +1255,10 @@ Rust is supported with any gdb/lldb-based debugger. So it works fine with
|
|||
headers/libs to build a C python extension for performance.
|
||||
* Full options: https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings
|
||||
|
||||
|
||||
**Migrating from `vscode-python`**: change `"adapter": "vscode-python"` to
|
||||
`"adapter": "debugpy"`.
|
||||
|
||||
```json
|
||||
{
|
||||
"configurations": {
|
||||
|
|
@ -1360,6 +1325,34 @@ debugpy](https://github.com/microsoft/debugpy/wiki/Debugging-over-SSH).
|
|||
If you're feeling fancy, checkout the [reference guide][remote-debugging] for
|
||||
an example of getting Vimspector to remotely launch and attach.
|
||||
|
||||
### Legacy: vscode-python
|
||||
|
||||
* No longer installed by default - please pass `--force-enable-python.legacy` if
|
||||
you just want to continue using your working setup.
|
||||
* [vscode-python](https://github.com/Microsoft/vscode-python)
|
||||
* NOTE: You must be running `node` 10. See [this issue](https://github.com/puremourning/vimspector/issues/105)
|
||||
|
||||
```json
|
||||
{
|
||||
"configurations": {
|
||||
"<name>: Launch": {
|
||||
"adapter": "vscode-python",
|
||||
"configuration": {
|
||||
"name": "<name>: Launch",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"cwd": "<working directory>",
|
||||
"stopOnEntry": true,
|
||||
"console": "externalTerminal",
|
||||
"debugOptions": [],
|
||||
"program": "<path to main python file>"
|
||||
}
|
||||
}
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## TCL
|
||||
|
||||
* TCL (TclProDebug)
|
||||
|
|
@ -1383,8 +1376,35 @@ netcoredbg`
|
|||
"program": "${workspaceRoot}/bin/Debug/netcoreapp2.2/csharp.dll",
|
||||
"args": [],
|
||||
"stopAtEntry": true,
|
||||
"cwd": "${workspaceRoot}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
* C# - mono
|
||||
|
||||
Install with `install_gadget.py --force-enable-csharp` or `:VimspectorInstall
|
||||
vscode-mono-debug`.
|
||||
|
||||
***Known not to work.***
|
||||
|
||||
```json
|
||||
{
|
||||
"configurations": {
|
||||
"launch - mono": {
|
||||
"adapter": "vscode-mono-debug",
|
||||
"configuration": {
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}/bin/Debug/netcoreapp2.2/csharp.dll",
|
||||
"args": [],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"env": {}
|
||||
"runtimeExecutable": "mono",
|
||||
"runtimeArgs": [],
|
||||
"env": [],
|
||||
"externalConsole": false,
|
||||
"console": "integratedTerminal"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1401,8 +1421,6 @@ Requires:
|
|||
* [Delve][delve-install] installed, e.g. `go get -u github.com/go-delve/delve/cmd/dlv`
|
||||
* Delve to be in your PATH, or specify the `dlvToolPath` launch option
|
||||
|
||||
NOTE: Vimspector uses the ["legacy" vscode-go debug adapter](https://github.com/golang/vscode-go/blob/master/docs/debugging-legacy.md) rather than the "built-in" DAP support in Delve. You can track https://github.com/puremourning/vimspector/issues/186 for that.
|
||||
|
||||
```json
|
||||
{
|
||||
"configurations": {
|
||||
|
|
@ -1420,7 +1438,7 @@ NOTE: Vimspector uses the ["legacy" vscode-go debug adapter](https://github.com/
|
|||
```
|
||||
|
||||
See the vscode-go docs for
|
||||
[troubleshooting information](https://github.com/golang/vscode-go/blob/master/docs/debugging-legacy.md#troubleshooting)
|
||||
[troubleshooting information](https://github.com/golang/vscode-go/blob/master/docs/debugging.md#troubleshooting)
|
||||
|
||||
## PHP
|
||||
|
||||
|
|
@ -1566,20 +1584,6 @@ editor plugin to use Java. I recommend [YouCompleteMe][], which has full support
|
|||
for jdt.ls, and most importantly a trivial way to load the debug adapter and to
|
||||
use it with Vimspector.
|
||||
|
||||
### Hot code replace
|
||||
|
||||
When using the [java debug server][java-debug-server], Vimspector supports the
|
||||
hot code replace custom feature. By default, when the underlying class files
|
||||
change, vimspector asks the user if they wish to reload these classes at
|
||||
runtime.
|
||||
|
||||
This behaviour can be customised:
|
||||
|
||||
* `let g:ycm_java_hotcodereplace_mode = 'ask'` - the default, ask the user for
|
||||
each reload.
|
||||
* `let g:ycm_java_hotcodereplace_mode = 'always'` - don't ask, always reload
|
||||
* `let g:ycm_java_hotcodereplace_mode = 'never'` - don't ask, never reload
|
||||
|
||||
### Usage with YouCompleteMe
|
||||
|
||||
* Set up [YCM for java][YcmJava].
|
||||
|
|
@ -1739,26 +1743,22 @@ Vimsector uses them, they will not be replaced. So to customise the signs,
|
|||
define them in your `vimrc`.
|
||||
|
||||
|
||||
| Sign | Description | Priority |
|
||||
|---------------------------|-----------------------------------------|----------|
|
||||
| `vimspectorBP` | Line breakpoint | 9 |
|
||||
| `vimspectorBPCond` | Conditional line breakpoint | 9 |
|
||||
| `vimspectorBPDisabled` | Disabled breakpoint | 9 |
|
||||
| `vimspectorPC` | Program counter (i.e. current line) | 200 |
|
||||
| `vimspectorPCBP` | Program counter and breakpoint | 200 |
|
||||
| `vimspectorCurrentThread` | Focussed thread in stack trace view | 200 |
|
||||
| `vimspectorCurrentFrame` | Current stack frame in stack trace view | 200 |
|
||||
| Sign | Description | Priority |
|
||||
|------------------------|-------------------------------------|----------|
|
||||
| `vimspectorBP` | Line breakpoint | 9 |
|
||||
| `vimspectorBPCond` | Conditional line breakpoint | 9 |
|
||||
| `vimspectorBPDisabled` | Disabled breakpoint | 9 |
|
||||
| `vimspectorPC` | Program counter (i.e. current line) | 200 |
|
||||
| `vimspectorPCBP` | Program counter and breakpoint | 200 |
|
||||
|
||||
The default symbols are the equivalent of something like the following:
|
||||
|
||||
```viml
|
||||
sign define vimspectorBP text=\ ● texthl=WarningMsg
|
||||
sign define vimspectorBPCond text=\ ◆ texthl=WarningMsg
|
||||
sign define vimspectorBPDisabled text=\ ● texthl=LineNr
|
||||
sign define vimspectorPC text=\ ▶ texthl=MatchParen linehl=CursorLine
|
||||
sign define vimspectorPCBP text=●▶ texthl=MatchParen linehl=CursorLine
|
||||
sign define vimspectorCurrentThread text=▶ texthl=MatchParen linehl=CursorLine
|
||||
sign define vimspectorCurrentFrame text=▶ texthl=Special linehl=CursorLine
|
||||
sign define vimspectorBP text=\ ● texthl=WarningMsg
|
||||
sign define vimspectorBPCond text=\ ◆ texthl=WarningMsg
|
||||
sign define vimspectorBPDisabled text=\ ● texthl=LineNr
|
||||
sign define vimspectorPC text=\ ▶ texthl=MatchParen linehl=CursorLine
|
||||
sign define vimspectorPCBP text=●▶ texthl=MatchParen linehl=CursorLine
|
||||
```
|
||||
|
||||
If the signs don't display properly, your font probably doesn't contain these
|
||||
|
|
@ -1766,13 +1766,11 @@ glyphs. You can easily change them by defining the sign in your vimrc. For
|
|||
example, you could put this in your `vimrc` to use some simple ASCII symbols:
|
||||
|
||||
```viml
|
||||
sign define vimspectorBP text=o texthl=WarningMsg
|
||||
sign define vimspectorBPCond text=o? texthl=WarningMsg
|
||||
sign define vimspectorBPDisabled text=o! texthl=LineNr
|
||||
sign define vimspectorPC text=\ > texthl=MatchParen
|
||||
sign define vimspectorPCBP text=o> texthl=MatchParen
|
||||
sign define vimspectorCurrentThread text=> texthl=MatchParen
|
||||
sign define vimspectorCurrentFrame text=> texthl=Special
|
||||
sign define vimspectorBP text=o texthl=WarningMsg
|
||||
sign define vimspectorBPCond text=o? texthl=WarningMsg
|
||||
sign define vimspectorBPDisabled text=o! texthl=LineNr
|
||||
sign define vimspectorPC text=\ > texthl=MatchParen
|
||||
sign define vimspectorPCBP text=o> texthl=MatchParen
|
||||
```
|
||||
|
||||
## Sign priority
|
||||
|
|
@ -2049,10 +2047,6 @@ hi link jsonComment Comment
|
|||
Debug adapters (for some reason) send telemetry data to clients. Vimspector simply
|
||||
displays this information in the output window. It *does not* and *will not ever*
|
||||
collect, use, forward or otherwise share any data with any third parties.
|
||||
10. Do I _have_ to put a `.vimspector.json` in the root of every project? No, you
|
||||
can put all of your adapter and debug configs in a [single directory](https://puremourning.github.io/vimspector/configuration.html#debug-configurations) if you want to, but note
|
||||
the caveat that `${workspaceRoot}` won't be calculated correctly in that case.
|
||||
The vimsepctor author uses this [a lot](https://github.com/puremourning/.vim-mac/tree/master/vimspector-conf).
|
||||
|
||||
|
||||
[ycmd]: https://github.com/Valloric/ycmd
|
||||
|
|
|
|||
|
|
@ -13,9 +13,6 @@
|
|||
" See the License for the specific language governing permissions and
|
||||
" limitations under the License.
|
||||
|
||||
if !has( 'python3' )
|
||||
finish
|
||||
endif
|
||||
|
||||
" Boilerplate {{{
|
||||
let s:save_cpo = &cpoptions
|
||||
|
|
@ -237,20 +234,6 @@ function! vimspector#GoToFrame() abort
|
|||
py3 _vimspector_session.ExpandFrameOrThread()
|
||||
endfunction
|
||||
|
||||
function! vimspector#UpFrame() abort
|
||||
if !s:Enabled()
|
||||
return
|
||||
endif
|
||||
py3 _vimspector_session.UpFrame()
|
||||
endfunction
|
||||
|
||||
function! vimspector#DownFrame() abort
|
||||
if !s:Enabled()
|
||||
return
|
||||
endif
|
||||
py3 _vimspector_session.DownFrame()
|
||||
endfunction
|
||||
|
||||
function! vimspector#AddWatch( ... ) abort
|
||||
if !s:Enabled()
|
||||
return
|
||||
|
|
@ -557,14 +540,6 @@ function! vimspector#ShowEvalBalloon( is_visual ) abort
|
|||
\ . '", 0 )' )
|
||||
endfunction
|
||||
|
||||
function! vimspector#PrintDebugInfo() abort
|
||||
if !s:Enabled()
|
||||
return
|
||||
endif
|
||||
|
||||
py3 _vimspector_session.PrintDebugInfo()
|
||||
endfunction
|
||||
|
||||
|
||||
" Boilerplate {{{
|
||||
let &cpoptions=s:save_cpo
|
||||
|
|
|
|||
|
|
@ -69,9 +69,14 @@ function! vimspector#internal#balloon#CreateTooltip( is_hover, ... ) abort
|
|||
\ 'resize': 1,
|
||||
\ 'close': 'button',
|
||||
\ 'callback': 'vimspector#internal#balloon#CloseCallback',
|
||||
\ 'mapping': 0
|
||||
\ }
|
||||
|
||||
let config = vimspector#internal#popup#SetBorderChars( config )
|
||||
" When ambiwidth is single, use prettier characters for the border. This
|
||||
" would look silly when ambiwidth is double.
|
||||
if &ambiwidth ==# 'single' && &encoding ==? 'utf-8'
|
||||
let config[ 'borderchars' ] = [ '─', '│', '─', '│', '╭', '╮', '┛', '╰' ]
|
||||
endif
|
||||
|
||||
if a:is_hover
|
||||
let config[ 'filter' ] = 'vimspector#internal#balloon#MouseFilter'
|
||||
|
|
@ -81,7 +86,6 @@ function! vimspector#internal#balloon#CreateTooltip( is_hover, ... ) abort
|
|||
let config[ 'filter' ] = 'vimspector#internal#balloon#CursorFilter'
|
||||
let config[ 'moved' ] = 'any'
|
||||
let config[ 'cursorline' ] = 1
|
||||
let config[ 'mapping' ] = 0
|
||||
let s:popup_win_id = popup_atcursor( body, config )
|
||||
endif
|
||||
|
||||
|
|
|
|||
|
|
@ -159,16 +159,15 @@ function! s:_OnCommandEvent( category, id, data, event ) abort
|
|||
call setbufvar( buffer, '&modified', 0 )
|
||||
endtry
|
||||
|
||||
" if the buffer is visible, scroll it, but don't allow autocommands to fire,
|
||||
" as this may close the current window!
|
||||
" if the buffer is visible, scroll it
|
||||
let w = bufwinnr( buffer )
|
||||
if w > 0
|
||||
let cw = winnr()
|
||||
try
|
||||
noautocmd execute w . 'wincmd w'
|
||||
noautocmd normal! Gz-
|
||||
execute w . 'wincmd w'
|
||||
normal! Gz-
|
||||
finally
|
||||
noautocmd execute cw . 'wincmd w'
|
||||
execute cw . 'wincmd w'
|
||||
endtry
|
||||
endif
|
||||
elseif a:event ==# 'exit'
|
||||
|
|
|
|||
|
|
@ -80,56 +80,6 @@ function! vimspector#internal#neopopup#HideSplash( id ) abort
|
|||
unlet s:db[ a:id ]
|
||||
endfunction
|
||||
|
||||
function! vimspector#internal#neopopup#Confirm( confirm_id,
|
||||
\ text,
|
||||
\ options,
|
||||
\ default_value,
|
||||
\ keys ) abort
|
||||
|
||||
" Neovim doesn't have an equivalent of popup_dialog, and it's way too much
|
||||
" effort to write one, so we just use confirm()...
|
||||
" Annoyingly we can't use confirm() here because for some reason it doesn't
|
||||
" render properly in a channel callback. So we use input() and mimic dialog
|
||||
" behaviour.
|
||||
let prompt = a:text
|
||||
for opt in a:options
|
||||
let prompt .= ' ' . opt
|
||||
endfor
|
||||
let prompt .= ': '
|
||||
|
||||
try
|
||||
let result = input( prompt, a:keys[ a:default_value - 1 ] )
|
||||
catch /.*/
|
||||
let result = -1
|
||||
endtry
|
||||
|
||||
" Map the results to what the vim popup stuff would return (s:ConfirmCallback
|
||||
" in popup.vim), i.e.:
|
||||
" - 1-based index of selected item, or
|
||||
" - -1 or 0 for cancellation
|
||||
if result == ''
|
||||
" User pressed ESC/ctrl-c
|
||||
let result = -1
|
||||
else
|
||||
let index = 1
|
||||
for k in a:keys
|
||||
if k ==? result
|
||||
let result = index
|
||||
break
|
||||
endif
|
||||
let index += 1
|
||||
endfor
|
||||
|
||||
if index > len( a:keys )
|
||||
let result = -1
|
||||
endif
|
||||
endif
|
||||
|
||||
py3 __import__( 'vimspector', fromlist = [ 'utils' ] ).utils.ConfirmCallback(
|
||||
\ int( vim.eval( 'a:confirm_id' ) ),
|
||||
\ int( vim.eval( 'result' ) ) )
|
||||
endfunction
|
||||
|
||||
" Boilerplate {{{
|
||||
let &cpoptions=s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
" See the License for the specific language governing permissions and
|
||||
" limitations under the License.
|
||||
scriptencoding utf-8
|
||||
|
||||
|
||||
" Boilerplate {{{
|
||||
|
|
@ -33,113 +32,6 @@ function! vimspector#internal#popup#HideSplash( id ) abort
|
|||
call popup_hide( a:id )
|
||||
endfunction
|
||||
|
||||
let s:current_selection = 0
|
||||
let s:selections = []
|
||||
let s:text = []
|
||||
|
||||
function! s:UpdatePopup( id ) abort
|
||||
let buf = copy( s:text )
|
||||
call extend( buf, s:DrawButtons() )
|
||||
call popup_settext( a:id, buf )
|
||||
endfunction
|
||||
|
||||
function! s:ConfirmKeyFilter( keys, id, key ) abort
|
||||
if a:key ==# "\<CR>"
|
||||
call popup_close( a:id, s:current_selection + 1 )
|
||||
return 1
|
||||
elseif index( [ "\<Tab>", "\<Right>" ], a:key ) >= 0
|
||||
let s:current_selection = ( s:current_selection + 1 ) % len( s:selections )
|
||||
call s:UpdatePopup( a:id )
|
||||
return 1
|
||||
elseif index( [ "\<S-Tab>", "\<Left>" ], a:key ) >= 0
|
||||
let s:current_selection = s:current_selection == 0
|
||||
\ ? len( s:selections ) - 1: s:current_selection - 1
|
||||
call s:UpdatePopup( a:id )
|
||||
return 1
|
||||
elseif a:key ==# "\<Esc>" || a:key ==# "\<C-c>"
|
||||
call popup_close( a:id, -1 )
|
||||
return 1
|
||||
endif
|
||||
|
||||
let index = 1
|
||||
for key in a:keys
|
||||
if a:key ==? key
|
||||
call popup_close( a:id, index )
|
||||
return 1
|
||||
endif
|
||||
let index += 1
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
function! s:ConfirmCallback( confirm_id, id, result ) abort
|
||||
py3 __import__( 'vimspector', fromlist = [ 'utils' ] ).utils.ConfirmCallback(
|
||||
\ int( vim.eval( 'a:confirm_id' ) ),
|
||||
\ int( vim.eval( 'a:result' ) ) )
|
||||
endfunction
|
||||
|
||||
function! s:SelectionPosition( idx ) abort
|
||||
return a:idx == 0 ? 0 : len( join( s:selections[ : a:idx - 1 ], ' ' ) ) + 1
|
||||
endfunction
|
||||
|
||||
function! s:DrawButtons() abort
|
||||
return [ {
|
||||
\ 'text': join( s:selections, ' ' ),
|
||||
\ 'props': [
|
||||
\ {
|
||||
\ 'col': s:SelectionPosition( s:current_selection ) + 1,
|
||||
\ 'length': len( s:selections[ s:current_selection ] ),
|
||||
\ 'type': 'VimspectorSelectedItem'
|
||||
\ },
|
||||
\ ]
|
||||
\ } ]
|
||||
endfunction
|
||||
|
||||
function! vimspector#internal#popup#Confirm(
|
||||
\ confirm_id,
|
||||
\ text,
|
||||
\ options,
|
||||
\ default_value,
|
||||
\ keys ) abort
|
||||
|
||||
silent! call prop_type_add( 'VimspectorSelectedItem', {
|
||||
\ 'highlight': 'PMenuSel'
|
||||
\ } )
|
||||
|
||||
let lines = split( a:text, "\n", v:true )
|
||||
let buf = []
|
||||
for line in lines
|
||||
call add( buf, { 'text': line, 'props': [] } )
|
||||
endfor
|
||||
|
||||
call add( buf, { 'text': '', 'props': [] } )
|
||||
|
||||
let s:selections = a:options
|
||||
let s:current_selection = ( a:default_value - 1 )
|
||||
|
||||
let s:text = copy( buf )
|
||||
call extend( buf, s:DrawButtons() )
|
||||
|
||||
let config = {
|
||||
\ 'callback': function( 's:ConfirmCallback', [ a:confirm_id ] ),
|
||||
\ 'filter': function( 's:ConfirmKeyFilter', [ a:keys ] ),
|
||||
\ 'mapping': v:false,
|
||||
\ }
|
||||
let config = vimspector#internal#popup#SetBorderChars( config )
|
||||
|
||||
return popup_dialog( buf, config )
|
||||
endfunction
|
||||
|
||||
function! vimspector#internal#popup#SetBorderChars( config ) abort
|
||||
" When ambiwidth is single, use prettier characters for the border. This
|
||||
" would look silly when ambiwidth is double.
|
||||
if &ambiwidth ==# 'single' && &encoding ==? 'utf-8'
|
||||
let a:config[ 'borderchars' ] = [ '─', '│', '─', '│', '╭', '╮', '┛', '╰' ]
|
||||
endif
|
||||
|
||||
return a:config
|
||||
endfunction
|
||||
|
||||
|
||||
" Boilerplate {{{
|
||||
let &cpoptions=s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
2394
doc/vimspector.txt
2394
doc/vimspector.txt
File diff suppressed because it is too large
Load diff
|
|
@ -1,13 +1,13 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
activesupport (6.0.3.6)
|
||||
activesupport (6.0.3.4)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 0.7, < 2)
|
||||
minitest (~> 5.1)
|
||||
tzinfo (~> 1.1)
|
||||
zeitwerk (~> 2.2, >= 2.2.2)
|
||||
addressable (2.8.0)
|
||||
addressable (2.7.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
coffee-script (2.4.1)
|
||||
coffee-script-source
|
||||
|
|
@ -16,7 +16,7 @@ GEM
|
|||
colorator (1.1.0)
|
||||
commonmarker (0.17.13)
|
||||
ruby-enum (~> 0.5)
|
||||
concurrent-ruby (1.1.8)
|
||||
concurrent-ruby (1.1.7)
|
||||
dnsruby (1.61.5)
|
||||
simpleidn (~> 0.1)
|
||||
em-websocket (0.5.2)
|
||||
|
|
@ -30,12 +30,12 @@ GEM
|
|||
faraday-net_http (~> 1.0)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
ruby2_keywords
|
||||
faraday-net_http (1.0.1)
|
||||
ffi (1.15.0)
|
||||
faraday-net_http (1.0.0)
|
||||
ffi (1.14.2)
|
||||
forwardable-extended (2.6.0)
|
||||
gemoji (3.0.1)
|
||||
github-pages (214)
|
||||
github-pages-health-check (= 1.17.0)
|
||||
github-pages (209)
|
||||
github-pages-health-check (= 1.16.1)
|
||||
jekyll (= 3.9.0)
|
||||
jekyll-avatar (= 0.7.0)
|
||||
jekyll-coffeescript (= 1.1.1)
|
||||
|
|
@ -50,9 +50,9 @@ GEM
|
|||
jekyll-readme-index (= 0.3.0)
|
||||
jekyll-redirect-from (= 0.16.0)
|
||||
jekyll-relative-links (= 0.6.1)
|
||||
jekyll-remote-theme (= 0.4.3)
|
||||
jekyll-remote-theme (= 0.4.2)
|
||||
jekyll-sass-converter (= 1.5.2)
|
||||
jekyll-seo-tag (= 2.7.1)
|
||||
jekyll-seo-tag (= 2.6.1)
|
||||
jekyll-sitemap (= 1.4.0)
|
||||
jekyll-swiss (= 1.0.0)
|
||||
jekyll-theme-architect (= 0.1.1)
|
||||
|
|
@ -70,19 +70,19 @@ GEM
|
|||
jekyll-theme-time-machine (= 0.1.1)
|
||||
jekyll-titles-from-headings (= 0.5.3)
|
||||
jemoji (= 0.12.0)
|
||||
kramdown (= 2.3.1)
|
||||
kramdown (= 2.3.0)
|
||||
kramdown-parser-gfm (= 1.1.0)
|
||||
liquid (= 4.0.3)
|
||||
mercenary (~> 0.3)
|
||||
minima (= 2.5.1)
|
||||
nokogiri (>= 1.10.4, < 2.0)
|
||||
rouge (= 3.26.0)
|
||||
rouge (= 3.23.0)
|
||||
terminal-table (~> 1.4)
|
||||
github-pages-health-check (1.17.0)
|
||||
github-pages-health-check (1.16.1)
|
||||
addressable (~> 2.3)
|
||||
dnsruby (~> 1.60)
|
||||
octokit (~> 4.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
public_suffix (~> 3.0)
|
||||
typhoeus (~> 1.3)
|
||||
html-pipeline (2.14.0)
|
||||
activesupport (>= 2)
|
||||
|
|
@ -136,15 +136,15 @@ GEM
|
|||
jekyll (>= 3.3, < 5.0)
|
||||
jekyll-relative-links (0.6.1)
|
||||
jekyll (>= 3.3, < 5.0)
|
||||
jekyll-remote-theme (0.4.3)
|
||||
jekyll-remote-theme (0.4.2)
|
||||
addressable (~> 2.0)
|
||||
jekyll (>= 3.5, < 5.0)
|
||||
jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0)
|
||||
rubyzip (>= 1.3.0, < 3.0)
|
||||
jekyll-sass-converter (1.5.2)
|
||||
sass (~> 3.4)
|
||||
jekyll-seo-tag (2.7.1)
|
||||
jekyll (>= 3.8, < 5.0)
|
||||
jekyll-seo-tag (2.6.1)
|
||||
jekyll (>= 3.3, < 5.0)
|
||||
jekyll-sitemap (1.4.0)
|
||||
jekyll (>= 3.7, < 5.0)
|
||||
jekyll-swiss (1.0.0)
|
||||
|
|
@ -196,23 +196,23 @@ GEM
|
|||
gemoji (~> 3.0)
|
||||
html-pipeline (~> 2.2)
|
||||
jekyll (>= 3.0, < 5.0)
|
||||
kramdown (2.3.1)
|
||||
kramdown (2.3.0)
|
||||
rexml
|
||||
kramdown-parser-gfm (1.1.0)
|
||||
kramdown (~> 2.0)
|
||||
liquid (4.0.3)
|
||||
listen (3.5.1)
|
||||
listen (3.4.0)
|
||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
rb-inotify (~> 0.9, >= 0.9.10)
|
||||
mercenary (0.3.6)
|
||||
mini_portile2 (2.5.1)
|
||||
mini_portile2 (2.5.0)
|
||||
minima (2.5.1)
|
||||
jekyll (>= 3.5, < 5.0)
|
||||
jekyll-feed (~> 0.9)
|
||||
jekyll-seo-tag (~> 2.1)
|
||||
minitest (5.14.4)
|
||||
minitest (5.14.3)
|
||||
multipart-post (2.1.1)
|
||||
nokogiri (1.11.5)
|
||||
nokogiri (1.11.1)
|
||||
mini_portile2 (~> 2.5.0)
|
||||
racc (~> 1.4)
|
||||
octokit (4.20.0)
|
||||
|
|
@ -220,16 +220,16 @@ GEM
|
|||
sawyer (~> 0.8.0, >= 0.5.3)
|
||||
pathutil (0.16.2)
|
||||
forwardable-extended (~> 2.6)
|
||||
public_suffix (4.0.6)
|
||||
public_suffix (3.1.1)
|
||||
racc (1.5.2)
|
||||
rb-fsevent (0.10.4)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
rexml (3.2.5)
|
||||
rouge (3.26.0)
|
||||
ruby-enum (0.9.0)
|
||||
rexml (3.2.4)
|
||||
rouge (3.23.0)
|
||||
ruby-enum (0.8.0)
|
||||
i18n
|
||||
ruby2_keywords (0.0.4)
|
||||
ruby2_keywords (0.0.2)
|
||||
rubyzip (2.3.0)
|
||||
safe_yaml (1.0.5)
|
||||
sass (3.7.4)
|
||||
|
|
@ -240,7 +240,7 @@ GEM
|
|||
sawyer (0.8.2)
|
||||
addressable (>= 2.3.5)
|
||||
faraday (> 0.8, < 2.0)
|
||||
simpleidn (0.2.1)
|
||||
simpleidn (0.1.1)
|
||||
unf (~> 0.1.4)
|
||||
terminal-table (1.8.0)
|
||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ JSON value `true`, and the suffix is stripped fom the key, resulting in the
|
|||
following:
|
||||
|
||||
```json
|
||||
"stopOnEntry": true
|
||||
"stopOnEntry#json": true
|
||||
```
|
||||
|
||||
Which is what we need.
|
||||
|
|
@ -722,7 +722,7 @@ Vimspector then orchestrates the various tools to set you up.
|
|||
"variables": {
|
||||
// Just an example of how to specify a variable manually rather than
|
||||
// vimspector asking for input from the user
|
||||
"ServiceName": "${fileBasenameNoExtension}"
|
||||
"ServiceName": "${fileBasenameNoExtention}"
|
||||
},
|
||||
|
||||
"adapter": "python-remote",
|
||||
|
|
|
|||
|
|
@ -13,13 +13,6 @@
|
|||
" See the License for the specific language governing permissions and
|
||||
" limitations under the License.
|
||||
|
||||
if !has( 'python3' )
|
||||
echohl WarningMsg
|
||||
echom 'Vimspector unavailable: Requires Vim compiled with +python3'
|
||||
echohl None
|
||||
finish
|
||||
endif
|
||||
|
||||
" Boilerplate {{{
|
||||
let s:save_cpo = &cpoptions
|
||||
set cpoptions&vim
|
||||
|
|
@ -76,11 +69,6 @@ nnoremap <silent> <Plug>VimspectorBalloonEval
|
|||
xnoremap <silent> <Plug>VimspectorBalloonEval
|
||||
\ :<c-u>call vimspector#ShowEvalBalloon( 1 )<CR>
|
||||
|
||||
nnoremap <silent> <Plug>VimspectorUpFrame
|
||||
\ :<c-u>call vimspector#UpFrame()<CR>
|
||||
nnoremap <silent> <Plug>VimspectorDownFrame
|
||||
\ :<c-u>call vimspector#DownFrame()<CR>
|
||||
|
||||
if s:mappings ==# 'VISUAL_STUDIO'
|
||||
nmap <F5> <Plug>VimspectorContinue
|
||||
nmap <S-F5> <Plug>VimspectorStop
|
||||
|
|
@ -115,9 +103,6 @@ command! -bar -nargs=? -complete=custom,vimspector#CompleteOutput
|
|||
command! -bar
|
||||
\ VimspectorToggleLog
|
||||
\ call vimspector#ToggleLog()
|
||||
command! -bar
|
||||
\ VimspectorDebugInfo
|
||||
\ call vimspector#PrintDebugInfo()
|
||||
command! -nargs=1 -complete=custom,vimspector#CompleteExpr
|
||||
\ VimspectorEval
|
||||
\ call vimspector#Evaluate( <f-args> )
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
# vimspector - A multi-language debugging system for Vim
|
||||
# Copyright 2021 Ben Jackson
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from vimspector.debug_session import DebugSession
|
||||
from vimspector import utils, settings
|
||||
|
||||
|
||||
class JavaDebugAdapter( object ):
|
||||
def __init__( self, debug_session: DebugSession ):
|
||||
self.debug_session = debug_session
|
||||
|
||||
def OnEvent_hotcodereplace( self, message ):
|
||||
# Hack for java debug server hot-code-replace
|
||||
body = message.get( 'body' ) or {}
|
||||
|
||||
if body.get( 'type' ) != 'hotcodereplace':
|
||||
return
|
||||
|
||||
if body.get( 'changeType' ) == 'BUILD_COMPLETE':
|
||||
def handler( result ):
|
||||
if result == 1:
|
||||
self.debug_session._connection.DoRequest( None, {
|
||||
'command': 'redefineClasses',
|
||||
'arguments': {},
|
||||
} )
|
||||
|
||||
mode = settings.Get( 'java_hotcodereplace_mode' )
|
||||
if mode == 'ask':
|
||||
utils.Confirm( self.debug_session._api_prefix,
|
||||
'Code has changed, hot reload?',
|
||||
handler,
|
||||
default_value = 1 )
|
||||
elif mode == 'always':
|
||||
self.debug_session._connection.DoRequest( None, {
|
||||
'command': 'redefineClasses',
|
||||
'arguments': {},
|
||||
} )
|
||||
elif body.get( 'message' ):
|
||||
utils.UserMessage( 'Hot code replace: ' + body[ 'message' ] )
|
||||
|
|
@ -29,14 +29,14 @@ class PendingRequest( object ):
|
|||
|
||||
|
||||
class DebugAdapterConnection( object ):
|
||||
def __init__( self, handlers, send_func ):
|
||||
def __init__( self, handler, send_func ):
|
||||
self._logger = logging.getLogger( __name__ )
|
||||
utils.SetUpLogging( self._logger )
|
||||
|
||||
self._Write = send_func
|
||||
self._SetState( 'READ_HEADER' )
|
||||
self._buffer = bytes()
|
||||
self._handlers = handlers
|
||||
self._handler = handler
|
||||
self._next_message_id = 0
|
||||
self._outstanding_requests = {}
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ class DebugAdapterConnection( object ):
|
|||
|
||||
def Reset( self ):
|
||||
self._Write = None
|
||||
self._handlers = None
|
||||
self._handler = None
|
||||
|
||||
while self._outstanding_requests:
|
||||
_, request = self._outstanding_requests.popitem()
|
||||
|
|
@ -226,12 +226,7 @@ class DebugAdapterConnection( object ):
|
|||
|
||||
# self._logger.debug( 'Message received (raw): %s', payload )
|
||||
|
||||
try:
|
||||
message = json.loads( payload, strict = False )
|
||||
except Exception:
|
||||
self._logger.exception( "Invalid message received: %s", payload )
|
||||
self._SetState( 'READ_HEADER' )
|
||||
raise
|
||||
message = json.loads( payload )
|
||||
|
||||
self._logger.debug( 'Message received: {0}'.format( message ) )
|
||||
|
||||
|
|
@ -242,7 +237,7 @@ class DebugAdapterConnection( object ):
|
|||
|
||||
|
||||
def _OnMessageReceived( self, message ):
|
||||
if not self._handlers:
|
||||
if not self._handler:
|
||||
return
|
||||
|
||||
if message[ 'type' ] == 'response':
|
||||
|
|
@ -275,21 +270,25 @@ class DebugAdapterConnection( object ):
|
|||
self._logger.error( 'Request failed: {0}'.format( reason ) )
|
||||
if request.failure_handler:
|
||||
request.failure_handler( reason, message )
|
||||
elif 'OnFailure' in dir( self._handler ):
|
||||
self._handler.OnFailure( reason, request.msg, message )
|
||||
else:
|
||||
for h in self._handlers:
|
||||
if 'OnFailure' in dir( h ):
|
||||
h.OnFailure( reason, request.msg, message )
|
||||
|
||||
utils.UserMessage( 'Request failed: {0}'.format( reason ) )
|
||||
elif message[ 'type' ] == 'event':
|
||||
method = 'OnEvent_' + message[ 'event' ]
|
||||
for h in self._handlers:
|
||||
if method in dir( h ):
|
||||
getattr( h, method )( message )
|
||||
if method in dir( self._handler ):
|
||||
getattr( self._handler, method )( message )
|
||||
else:
|
||||
utils.UserMessage( 'Unhandled event: {0}'.format( message[ 'event' ] ),
|
||||
persist = True )
|
||||
elif message[ 'type' ] == 'request':
|
||||
method = 'OnRequest_' + message[ 'command' ]
|
||||
for h in self._handlers:
|
||||
if method in dir( h ):
|
||||
getattr( h, method )( message )
|
||||
if method in dir( self._handler ):
|
||||
getattr( self._handler, method )( message )
|
||||
else:
|
||||
utils.UserMessage(
|
||||
'Unhandled request: {0}'.format( message[ 'command' ] ),
|
||||
persist = True )
|
||||
|
||||
|
||||
def _KillTimer( request ):
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue