Skip to content

Commit 9a310d7

Browse files
authored
Merge branch 'master' into docker-workdir-support
2 parents 01300d0 + 7d59d38 commit 9a310d7

File tree

19 files changed

+243
-312
lines changed

19 files changed

+243
-312
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ contact_links:
33
- name: Questions and support
44
url: 'https://matrix.to/#/#vimspector_Lobby:gitter.im'
55
about: Please ask and answer questions here.
6-
- name: Discussions
7-
url: https://github.com/puremourning/vimspector/discussions
8-
about: Please post questions and useful hints here
96
- name: Support for additional languages
107
url: https://github.com/puremourning/vimspector/wiki/languages
118
about: Please see here for information on support for additional languages

.github/workflows/build.yaml

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,8 @@ jobs:
8787
name: 'test-logs-${{ runner.os }}-${{ matrix.runtime }}'
8888
path: 'tests/logs/**/*'
8989

90-
- name: 'Package'
91-
if: matrix.runtime == 'vim'
92-
run: ./make_package linux ${{ github.run_id }}
93-
9490
# TODO: test the tarball
9591

96-
- name: "Upload package"
97-
if: matrix.runtime == 'vim'
98-
uses: actions/upload-artifact@v2
99-
with:
100-
name: 'package-linux'
101-
path: 'package/linux-${{ github.run_id }}.tar.gz'
102-
10392
# - name: Start SSH session if failed
10493
# uses: luchihoratiu/debug-via-ssh@main
10594
# if: failure()
@@ -180,66 +169,11 @@ jobs:
180169
name: 'test-logs-${{ runner.os }}-${{ matrix.runtime }}'
181170
path: 'tests/logs/**/*'
182171

183-
- name: 'Package'
184-
if: matrix.runtime == 'vim'
185-
run: ./make_package macos ${{ github.run_id }}
186-
187172
# TODO: test the tarball
188173

189-
- name: "Upload package"
190-
if: matrix.runtime == 'vim'
191-
uses: actions/upload-artifact@v2
192-
with:
193-
name: 'package-macos'
194-
path: 'package/macos-${{ github.run_id }}.tar.gz'
195-
196174
# - name: Start SSH session if failed
197175
# uses: luchihoratiu/debug-via-ssh@main
198176
# if: failure() || cancelled()
199177
# with:
200178
# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
201179
# SSH_PASS: ${{ secrets.SSH_PASS }}
202-
203-
PublishRelease:
204-
runs-on: 'ubuntu-20.04'
205-
needs:
206-
- Linux
207-
- MacOS
208-
if: github.ref == 'refs/heads/master'
209-
steps:
210-
- name: 'Download artifacts'
211-
id: download_artifacts
212-
uses: actions/download-artifact@v2
213-
214-
- name: 'Create Release'
215-
id: create_release
216-
uses: actions/create-release@v1
217-
env:
218-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
219-
with:
220-
tag_name: ${{ github.run_id }}
221-
release_name: Build ${{ github.run_id }}
222-
draft: false
223-
prerelease: true
224-
225-
- name: 'Upload Linux Package'
226-
id: upload-release-asset-linux
227-
uses: actions/upload-release-asset@v1
228-
env:
229-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
230-
with:
231-
upload_url: ${{ steps.create_release.outputs.upload_url }}
232-
asset_path: ${{ steps.download_artifacts.outputs.download-path }}/package-linux/linux-${{ github.run_id }}.tar.gz
233-
asset_name: vimspector-linux-${{ github.run_id }}.tar.gz
234-
asset_content_type: application/gzip
235-
236-
- name: 'Upload MacOS Package'
237-
id: upload-release-asset-macos
238-
uses: actions/upload-release-asset@v1
239-
env:
240-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
241-
with:
242-
upload_url: ${{ steps.create_release.outputs.upload_url }}
243-
asset_path: ${{ steps.download_artifacts.outputs.download-path }}/package-macos/macos-${{ github.run_id }}.tar.gz
244-
asset_name: vimspector-macos-${{ github.run_id }}.tar.gz
245-
asset_content_type: application/gzip

README.md

Lines changed: 46 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ For detailed explanation of the `.vimspector.json` format, see the
1515
* [Other languages](#other-languages)
1616
* [Installation](#installation)
1717
* [Quick Start](#quick-start)
18-
* [Method 1: Using a release tarball and Vim packages](#method-1-using-a-release-tarball-and-vim-packages)
19-
* [Method 2: Using a repo clone, Vim packages and select gadgets to be installed](#method-2-using-a-repo-clone-vim-packages-and-select-gadgets-to-be-installed)
20-
* [Method 3: Using a plugin manager](#method-3-using-a-plugin-manager)
18+
* [Method 1: Using a repo clone, Vim packages and select gadgets to be installed](#method-2-using-a-repo-clone-vim-packages-and-select-gadgets-to-be-installed)
19+
* [Method 2: Using a plugin manager](#method-3-using-a-plugin-manager)
2120
* [Dependencies](#dependencies)
2221
* [Neovim limitations](#neovim-limitations)
2322
* [Windows differences](#windows-differences)
@@ -90,7 +89,7 @@ For detailed explanation of the `.vimspector.json` format, see the
9089
* [PHP](#php)
9190
* [Debug web application](#debug-web-application)
9291
* [Debug cli application](#debug-cli-application)
93-
* [JavaScript, TypeScript, etc.](#javascript-typescript-etc)
92+
* [JavaScript and TypeScript](#javascript-and-typescript)
9493
* [Java](#java)
9594
* [Hot code replace](#hot-code-replace)
9695
* [Usage with YouCompleteMe](#usage-with-youcompleteme)
@@ -201,37 +200,12 @@ To use Vimspector with a language that's not "built-in", see this
201200

202201
## Quick Start
203202

204-
There are 3 installation methods:
203+
There are 2 installation methods:
205204

206-
* Using a release tarball and Vim packages
207205
* Using a repo clone and Vim packages
208206
* Using a plugin manager
209207

210-
### Method 1: Using a release tarball and Vim packages
211-
212-
Release tarballs come with debug adapters for the default languages
213-
pre-packaged. To use a release tarball:
214-
215-
1. [Check the dependencies](#dependencies)
216-
2. Untar the release tarball for your OS into `$HOME/.vim/pack`:
217-
218-
```bash
219-
$ mkdir -p $HOME/.vim/pack
220-
$ curl -L <url> | tar -C $HOME/.vim/pack zxvf -
221-
```
222-
223-
3. Add `packadd! vimspector` to your `.vimrc`
224-
225-
4. (optionally) Enable the default set of mappings:
226-
227-
```vim
228-
let g:vimspector_enable_mappings = 'HUMAN'
229-
```
230-
231-
5. Configure your project's debug profiles (create `.vimspector.json`, or set
232-
`g:vimspector_configurations`) - see the [reference guide][vimspector-ref]
233-
234-
### Method 2: Using a repo clone, Vim packages and select gadgets to be installed
208+
### Method 1: Using a repo clone, Vim packages and select gadgets to be installed
235209

236210
1. [Check the dependencies](#dependencies)
237211
1. Install the plugin as a Vim package. See `:help packages`.
@@ -240,10 +214,10 @@ pre-packaged. To use a release tarball:
240214
3. Configure your project's debug profiles (create `.vimspector.json`, or set
241215
`g:vimspector_configurations`) - see the [reference guide][vimspector-ref]
242216

243-
### Method 3: Using a plugin manager
217+
### Method 2: Using a plugin manager
244218

245219
1. [Check the dependencies](#dependencies)
246-
1. See the plugin manager's docs and install the plugin
220+
1. See the plugin manager's docs and install the plugin
247221
For Vundle, use:
248222

249223
```vim
@@ -296,10 +270,10 @@ The following features are not implemented for Windows:
296270
If you just want to try out vimspector without changing your vim config, there
297271
are example projects for a number of languages in `support/test`, including:
298272

299-
* Python (`support/test/python/simple_python`)
300-
* Go (`support/test/go/hello_world` and `support/test/go/name-starts-with-vowel`)
301-
* Nodejs (`support/test/node/simple`)
302-
* Chrome/Firefox (`support/test/web/`)
273+
* Python ([support/test/python/simple_python](support/test/python/simple_python))
274+
* Go ([support/test/go/hello_world](support/test/go/hello_world) and [support/test/go/name-starts-with-vowel](support/test/go/name-starts-with-vowel))
275+
* Nodejs ([support/test/node/simple](support/test/node/simple))
276+
* Chrome/Firefox ([support/test/web](support/test/web))
303277
* etc.
304278

305279
To test one of these out, cd to the directory and run:
@@ -315,10 +289,7 @@ which can be used to check everything is working. This is used by the regression
315289
tests in CI so should always work, and is a good way to check if the problem is
316290
your configuration rather than a bug.
317291

318-
## Cloning the plugin
319-
320-
If you're not using a release tarball, you'll need to clone this repo to the
321-
appropriate place.
292+
## Installing the plugin
322293

323294
1. Clone the plugin
324295

@@ -363,8 +334,6 @@ In order for Vimspector to be useful, you need to have some adapters installed.
363334

364335
There are a few ways to do this:
365336

366-
* If you downloaded a tarball, gadgets for main supported languages are already
367-
installed for you.
368337
* Using `:VimspectorInstall <adapter> <args...>` (use TAB `wildmenu` to see the
369338
options, also accepts any `install_gadget.py` option)
370339
* Using `python3 install_gadget.py <args>` (use `--help` to see all options)
@@ -588,7 +557,7 @@ Vimspector is not:
588557
aproach. This means that it can only provide essential/basic debugging
589558
features for a given language. This makes it convenient for everyday usage,
590559
but not ideal for power users or those with very precise or specific
591-
requirements. See [motivation](#motivation) for more info.
560+
requirements. See [motivation](#motivation) for more info.
592561

593562
## Status
594563

@@ -662,7 +631,7 @@ Copyright © 2018 Ben Jackson
662631
## Sponsorship
663632

664633
If you like Vimspector so much that you're wiling to part with your hard-earned
665-
cash, please consider donating to one of the following charities, which are
634+
cash, please consider donating to one of the following charities, which are
666635
meaningful to the author of Vimspector (in order of preference):
667636

668637
* [Hector's Greyhound Rescue](http://hectorsgreyhoundrescue.org)
@@ -826,19 +795,17 @@ request, then you will be asked to enter a PID (process ID) to attach to.
826795
To make this easier, Vimspector supplies a little utility for listing PIDs. It's
827796
like a very very simple clone of `ps` but works on all the supported platforms.
828797
See [its README](support/vimspector_process_list/README.md) for instructions on
829-
setting it up.
798+
setting it up.
830799

831-
In short:
832-
833-
- If you used a tarball installation, you don't need to do anything.
834-
- Otherwise, run `go build` in the `support/vimspector_process_list` directory
800+
Run `go build` in the `support/vimspector_process_list` directory to set it
801+
up.
835802

836803
If Vimspector is able to find this app, it will try to list all processes owned
837804
by the current user by default.
838805

839806
Alternatively (preferably), you can use a special form of variable expansion
840807
called `${PickProcess(\"binaryName\")}`. The version of this call will list all
841-
processes for the current user that match this binary name.
808+
processes for the current user that match this binary name.
842809

843810
For example:
844811

@@ -1156,7 +1123,7 @@ the [breakpoints window](#breakpoints-window).
11561123

11571124
Currently, instruction breakpoints are automatically cleared when the debug
11581125
session ends. The reason for this is that the addresses can't be guaranteed to
1159-
be valid for any other debug session. However, this may also change in future.
1126+
be valid for any other debug session. However, this may also change in future.
11601127

11611128
### Clear breakpoints
11621129

@@ -1329,7 +1296,7 @@ let g:ycm_semantic_triggers = {
13291296
* Dispplay disassembly around current PC
13301297
* Step over/into/out by instruction (contextually, or using the WinBar)
13311298
* `:VimspectorDisassemble`, `vimspector#ShowDisassembly()` or
1332-
`<Plug>VimspectorDisassemble`
1299+
`<Plug>VimspectorDisassemble`
13331300

13341301
[![Demo](https://asciinema.org/a/esEncAxP45CJmo8Em1sQtxRYe.svg)](https://asciinema.org/a/esEncAxP45CJmo8Em1sQtxRYe)
13351302

@@ -2151,34 +2118,47 @@ export XDEBUG_CONFIG="idekey=xdebug"
21512118
php <path to script>
21522119
```
21532120

2154-
## JavaScript, TypeScript, etc.
2121+
## JavaScript and TypeScript
21552122

21562123
* Node.js
21572124

2158-
Requires:
2125+
This uses [vscode-js-debug](https://github.com/microsoft/vscode-js-debug), the
2126+
debugger that is used in vscode as well. For additional configurations, check
2127+
the documentation [here](https://github.com/microsoft/vscode-js-debug/blob/main/OPTIONS.md).
21592128

2160-
* `install_gadget.py --force-enable-node`
2161-
* Options described here:
2162-
https://github.com/microsoft/vscode-js-debug/blob/main/OPTIONS.md
2163-
* Example: `support/test/node/simple`, `support/test/node/multiprocess`
2129+
To install vscode-js-debug, run `VimspectorInstall vscode-js-debug` from vim or
2130+
run the install script `install_gadget.py --force-enable-node`. There are
2131+
multiple examples which you can check out. Find them under
2132+
`support/test/node/simple`, `support/test/node/multiprocess` and
2133+
`support/test/node/typescript`. A typical configuration for debugging typescript
2134+
looks like this:
21642135

21652136
```json
2137+
21662138
{
21672139
"configurations": {
2168-
"run": {
2140+
"run - js-debug": {
21692141
"adapter": "js-debug",
2170-
"filetypes": [ "javascript", "typescript" ], // optional
2142+
"filetypes": [ "javascript", "typescript" ],
21712143
"configuration": {
21722144
"request": "launch",
2173-
"stopOnEntry": true,
2174-
"console": "integratedTerminal",
2175-
"program": "${workspaceRoot}/simple.js",
2145+
"program": "${workspaceRoot}/src/index.ts",
21762146
"cwd": "${workspaceRoot}",
2177-
"type": "pwa-node" // this is the default, but see below
2147+
"stopOnEntry": false,
2148+
"type": "pwa-node"
2149+
},
2150+
// 'breakpoints' is an optional part. This is a way to configure exception
2151+
// breakpoints. You can leave this out or set as you prefer.
2152+
"breakpoints": {
2153+
"exception": {
2154+
"all": "N",
2155+
"uncaught": "N"
2156+
}
21782157
}
21792158
}
21802159
}
21812160
}
2161+
21822162
```
21832163

21842164
`vscode-js-debug` supports a number of different "types" and can do some stuff
@@ -2670,7 +2650,7 @@ as it is a common requirement.
26702650
In many cases you will want to rebuild your project before starting a new debugging
26712651
session. Vimspector is not a task manager and implementing this functionality
26722652
is out of the scope of this project. However, there are some strategies described in the
2673-
[community wiki](https://github.com/puremourning/vimspector/wiki/Pre-launch-building-strategies)
2653+
[community wiki](https://github.com/puremourning/vimspector/wiki/Pre-launch-building-strategies)
26742654
to achieve similar functionality.
26752655

26762656

0 commit comments

Comments
 (0)