Reshuffle README
This commit is contained in:
parent
a9d0ebde0b
commit
979c1e8779
1 changed files with 71 additions and 47 deletions
116
README.md
116
README.md
|
|
@ -11,16 +11,17 @@ For a tutorial and usage overview, take a look at the
|
||||||
* [Supported languages](#supported-languages)
|
* [Supported languages](#supported-languages)
|
||||||
* [Other languages](#other-languages)
|
* [Other languages](#other-languages)
|
||||||
* [Installation](#installation)
|
* [Installation](#installation)
|
||||||
|
* [Quick Start](#quick-start)
|
||||||
* [Dependencies](#dependencies)
|
* [Dependencies](#dependencies)
|
||||||
* [Neovim differences](#neovim-differences)
|
* [Neovim differences](#neovim-differences)
|
||||||
* [Windows differences](#windows-differences)
|
* [Windows differences](#windows-differences)
|
||||||
* [Clone the plugin](#clone-the-plugin)
|
* [Trying it out](#trying-it-out)
|
||||||
|
* [Cloning the plugin](#cloning-the-plugin)
|
||||||
* [Install some gadgets](#install-some-gadgets)
|
* [Install some gadgets](#install-some-gadgets)
|
||||||
* [VimspectorInstall and VimspectorUpdate commands](#vimspectorinstall-and-vimspectorupdate-commands)
|
* [VimspectorInstall and VimspectorUpdate commands](#vimspectorinstall-and-vimspectorupdate-commands)
|
||||||
* [install_gadget.py](#install_gadgetpy)
|
* [install_gadget.py](#install_gadgetpy)
|
||||||
* [Manual gadget installation](#manual-gadget-installation)
|
* [Manual gadget installation](#manual-gadget-installation)
|
||||||
* [The gadget directory](#the-gadget-directory)
|
* [The gadget directory](#the-gadget-directory)
|
||||||
* [Trying it out](#trying-it-out)
|
|
||||||
* [Upgrade](#upgrade)
|
* [Upgrade](#upgrade)
|
||||||
* [About](#about)
|
* [About](#about)
|
||||||
* [Background](#background)
|
* [Background](#background)
|
||||||
|
|
@ -33,9 +34,11 @@ For a tutorial and usage overview, take a look at the
|
||||||
* [Launch and attach by PID:](#launch-and-attach-by-pid)
|
* [Launch and attach by PID:](#launch-and-attach-by-pid)
|
||||||
* [Launch with options](#launch-with-options)
|
* [Launch with options](#launch-with-options)
|
||||||
* [Debug configuration selection](#debug-configuration-selection)
|
* [Debug configuration selection](#debug-configuration-selection)
|
||||||
|
* [Get configurations](#get-configurations)
|
||||||
* [Breakpoints](#breakpoints)
|
* [Breakpoints](#breakpoints)
|
||||||
* [Exception breakpoints](#exception-breakpoints)
|
* [Exception breakpoints](#exception-breakpoints)
|
||||||
* [Clear breakpoints](#clear-breakpoints)
|
* [Clear breakpoints](#clear-breakpoints)
|
||||||
|
* [Run to Cursor](#run-to-cursor)
|
||||||
* [Stepping](#stepping)
|
* [Stepping](#stepping)
|
||||||
* [Variables and scopes](#variables-and-scopes)
|
* [Variables and scopes](#variables-and-scopes)
|
||||||
* [Watches](#watches)
|
* [Watches](#watches)
|
||||||
|
|
@ -48,6 +51,7 @@ For a tutorial and usage overview, take a look at the
|
||||||
* [Closing debugger](#closing-debugger)
|
* [Closing debugger](#closing-debugger)
|
||||||
* [Debug adapter configuration](#debug-adapter-configuration)
|
* [Debug adapter configuration](#debug-adapter-configuration)
|
||||||
* [C, C , Rust, etc.](#c-c-rust-etc)
|
* [C, C , Rust, etc.](#c-c-rust-etc)
|
||||||
|
* [Rust](#rust)
|
||||||
* [Remote debugging](#remote-debugging)
|
* [Remote debugging](#remote-debugging)
|
||||||
* [Remote launch and attach](#remote-launch-and-attach)
|
* [Remote launch and attach](#remote-launch-and-attach)
|
||||||
* [Python](#python)
|
* [Python](#python)
|
||||||
|
|
@ -65,7 +69,6 @@ For a tutorial and usage overview, take a look at the
|
||||||
* [Usage with YouCompleteMe](#usage-with-youcompleteme)
|
* [Usage with YouCompleteMe](#usage-with-youcompleteme)
|
||||||
* [Other LSP clients](#other-lsp-clients)
|
* [Other LSP clients](#other-lsp-clients)
|
||||||
* [Lua](#lua)
|
* [Lua](#lua)
|
||||||
* [Rust](#rust)
|
|
||||||
* [Other servers](#other-servers)
|
* [Other servers](#other-servers)
|
||||||
* [Customisation](#customisation)
|
* [Customisation](#customisation)
|
||||||
* [Changing the default signs](#changing-the-default-signs)
|
* [Changing the default signs](#changing-the-default-signs)
|
||||||
|
|
@ -80,7 +83,7 @@ For a tutorial and usage overview, take a look at the
|
||||||
* [License](#license)
|
* [License](#license)
|
||||||
* [Sponsorship](#sponsorship)
|
* [Sponsorship](#sponsorship)
|
||||||
|
|
||||||
<!-- Added by: ben, at: Fri 4 Sep 2020 00:48:17 BST -->
|
<!-- Added by: ben, at: Sun 22 Nov 2020 14:35:00 GMT -->
|
||||||
|
|
||||||
<!--te-->
|
<!--te-->
|
||||||
|
|
||||||
|
|
@ -121,8 +124,6 @@ And a couple of brief demos:
|
||||||
- logging/stdout display
|
- logging/stdout display
|
||||||
- simple stable API for custom tooling (e.g. integrate with language server)
|
- simple stable API for custom tooling (e.g. integrate with language server)
|
||||||
|
|
||||||
For other languages, you'll need some other way to install the gadget.
|
|
||||||
|
|
||||||
## Supported languages
|
## Supported languages
|
||||||
|
|
||||||
The following table lists the languages that are "built-in" (along with their
|
The following table lists the languages that are "built-in" (along with their
|
||||||
|
|
@ -158,10 +159,12 @@ To use Vimspector with a language that's not "built-in", see this
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
There are 2 installation methods:
|
There are 2 installation methods:
|
||||||
|
|
||||||
* Using a release tarball, or
|
* Using a release tarball and vim packages
|
||||||
* Manually
|
* Using a clone of the repo (e.g. package manager)
|
||||||
|
|
||||||
Release tarballs come with debug adapters for the default languages
|
Release tarballs come with debug adapters for the default languages
|
||||||
pre-packaged. To use a release tarball:
|
pre-packaged. To use a release tarball:
|
||||||
|
|
@ -174,15 +177,27 @@ $ mkdir -p $HOME/.vim/pack
|
||||||
$ curl -L <url> | tar -C $HOME/.vim/pack zxvf -
|
$ curl -L <url> | tar -C $HOME/.vim/pack zxvf -
|
||||||
```
|
```
|
||||||
|
|
||||||
|
3. Add `packadd! vimspector` to you `.vimrc`
|
||||||
|
|
||||||
3. Configure your project's debug profiles (create `.vimspector.json`)
|
3. Configure your project's debug profiles (create `.vimspector.json`)
|
||||||
|
|
||||||
Alternatively, you can clone the repo and select which gadgets are installed:
|
Alternatively, you can clone the repo and select which gadgets are installed:
|
||||||
|
|
||||||
1. Check the dependencies
|
1. Check the dependencies
|
||||||
1. Install the plugin as a Vim package. See `:help packages`.
|
1. Install the plugin as a Vim package. See `:help packages`.
|
||||||
2. Install some 'gadgets' (debug adapters)
|
2. Add `packadd! vimspector` to you `.vimrc`
|
||||||
|
2. Install some 'gadgets' (debug adapters) - see `:VimspectorInstall ...`
|
||||||
3. Configure your project's debug profiles (create `.vimspector.json`)
|
3. Configure your project's debug profiles (create `.vimspector.json`)
|
||||||
|
|
||||||
|
If you prefer to use a plugin manager, see the plugin manager's docs. For
|
||||||
|
Vundle, use:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
Plugin 'puremourning/vimspector'
|
||||||
|
```
|
||||||
|
|
||||||
|
The following sections expand on the above brief overview.
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
Vimspector requires:
|
Vimspector requires:
|
||||||
|
|
@ -239,20 +254,54 @@ The following features are not implemented for Windows:
|
||||||
|
|
||||||
* Tailing the vimspector log in the Output Window.
|
* Tailing the vimspector log in the Output Window.
|
||||||
|
|
||||||
## Clone the plugin
|
## Trying it out
|
||||||
|
|
||||||
|
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`)
|
||||||
|
* Nodejs (`support/test/node/simple`)
|
||||||
|
* Chrome (`support/test/chrome/`)
|
||||||
|
* etc.
|
||||||
|
|
||||||
|
To test one of these out, cd to the directory and run:
|
||||||
|
|
||||||
|
```
|
||||||
|
vim -Nu /path/to/vimspector/tests/vimrc --cmd "let g:vimspector_enable_mappings='HUMAN'"
|
||||||
|
```
|
||||||
|
|
||||||
|
Then press `<F5>`.
|
||||||
|
|
||||||
|
There's also a C++ project in `tests/testdata/cpp/simple/` with a `Makefile`
|
||||||
|
which can be used to check everything is working. This is used by the regression
|
||||||
|
tests in CI so should always work, and is a good way to check if the problem is
|
||||||
|
your configuration rather than a bug.
|
||||||
|
|
||||||
|
## Cloning the plugin
|
||||||
|
|
||||||
|
If you're not using a release tarball, you'll need to clone this repo to the
|
||||||
|
appropriate place.
|
||||||
|
|
||||||
|
1. Clone the plugin
|
||||||
|
|
||||||
There are many Vim plugin managers, and I'm not going to state a particular
|
There are many Vim plugin managers, and I'm not going to state a particular
|
||||||
preference, so if you choose to use one, you're on your own with installation
|
preference, so if you choose to use one, follow the plugin manager's
|
||||||
issues.
|
documentation. For example, for Vundle, use:
|
||||||
|
|
||||||
Install vimspector as a Vim package, either by cloning this repository into your
|
```viml
|
||||||
package path, like this:
|
Plugin 'puremourning/vimspector'
|
||||||
|
```
|
||||||
|
|
||||||
|
If you don't use a plugin manager already, install vimspector as a Vim package
|
||||||
|
by cloning this repository into your package path, like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ git clone https://github.com/puremourning/vimspector ~/.vim/pack/vimspector/opt/vimspector
|
$ git clone https://github.com/puremourning/vimspector ~/.vim/pack/vimspector/opt/vimspector
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Configure vimspector in your `.vimrc`:
|
2. Configure vimspector in your `.vimrc`, for example to enable the standard
|
||||||
|
mapings:
|
||||||
|
|
||||||
```viml
|
```viml
|
||||||
let g:vimspector_enable_mappings = 'HUMAN'
|
let g:vimspector_enable_mappings = 'HUMAN'
|
||||||
|
|
@ -265,7 +314,7 @@ let g:vimspector_enable_mappings = 'HUMAN'
|
||||||
packadd! vimspector
|
packadd! vimspector
|
||||||
```
|
```
|
||||||
|
|
||||||
See support/doc/example_vimrc.vim.
|
See support/doc/example_vimrc.vim for a minimal example.
|
||||||
|
|
||||||
## Install some gadgets
|
## Install some gadgets
|
||||||
|
|
||||||
|
|
@ -281,11 +330,10 @@ There are a few ways to do this:
|
||||||
installed for you.
|
installed for you.
|
||||||
* Using `:VimspectorInstall <adapter> <args...>` (use TAB `wildmenu` to see the
|
* Using `:VimspectorInstall <adapter> <args...>` (use TAB `wildmenu` to see the
|
||||||
options, also accepts any `install_gadget.py` option)
|
options, also accepts any `install_gadget.py` option)
|
||||||
* Alternatively, using `python3 install_gadget.py <args>` (use `--help` to see
|
* Using `python3 install_gadget.py <args>` (use `--help` to see all options)
|
||||||
all options)
|
* Attempting to launch a debug configuration; if the configured adapter
|
||||||
* When attempting to launch a debug configuration, if the configured adapter
|
can't be found, vimspector will suggest installing one.
|
||||||
can't be found, vimspector might suggest installing one.
|
* Using `:VimspectorUpdate` to install the latest supported versions of the
|
||||||
* Use `:VimspectorUpdate` to install the latest supported versions of the
|
|
||||||
gadgets.
|
gadgets.
|
||||||
|
|
||||||
Here's a demo of doing somee installs and an upgrade:
|
Here's a demo of doing somee installs and an upgrade:
|
||||||
|
|
@ -306,7 +354,7 @@ they will:
|
||||||
broken in this regard.
|
broken in this regard.
|
||||||
* Set up the `gadgetDir` symlinks for the platform.
|
* Set up the `gadgetDir` symlinks for the platform.
|
||||||
|
|
||||||
To install the tested debug adapter for a language, run:
|
For example, to install the tested debug adapter for a language, run:
|
||||||
|
|
||||||
| To install | Script | Command |
|
| To install | Script | Command |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
|
|
@ -468,30 +516,6 @@ Vimspector will also load any fies matching:
|
||||||
format as `.gadgets.json` but are not overwritten when running
|
format as `.gadgets.json` but are not overwritten when running
|
||||||
`install_gadget.py`.
|
`install_gadget.py`.
|
||||||
|
|
||||||
## Trying it out
|
|
||||||
|
|
||||||
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`)
|
|
||||||
* Nodejs (`support/test/node/simple`)
|
|
||||||
* Chrome (`support/test/chrome/`)
|
|
||||||
* etc.
|
|
||||||
|
|
||||||
To test one of these out, cd to the directory and run:
|
|
||||||
|
|
||||||
```
|
|
||||||
vim -Nu /path/to/vimspector/tests/vimrc --cmd "let g:vimspector_enable_mappings='HUMAN'"
|
|
||||||
```
|
|
||||||
|
|
||||||
Then press `<F5>`.
|
|
||||||
|
|
||||||
There's also a C++ project in `tests/testdata/cpp/simple/` with a `Makefile`
|
|
||||||
which can be used to check everything is working. This is used by the regression
|
|
||||||
tests in CI so should always work, and is a good way to check if the problem is
|
|
||||||
your configuration rather than a bug.
|
|
||||||
|
|
||||||
## Upgrade
|
## Upgrade
|
||||||
|
|
||||||
After updating the Vimspector code (either via `git pull` or whatever package
|
After updating the Vimspector code (either via `git pull` or whatever package
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue