@@ -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
2362101 . [ Check the dependencies] ( #dependencies )
2372111 . Install the plugin as a Vim package. See ` :help packages ` .
@@ -240,10 +214,10 @@ pre-packaged. To use a release tarball:
2402143 . 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
2452191 . [ 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:
296270If you just want to try out vimspector without changing your vim config, there
297271are 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
305279To 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
315289tests in CI so should always work, and is a good way to check if the problem is
316290your 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
3232941 . Clone the plugin
324295
@@ -363,8 +334,6 @@ In order for Vimspector to be useful, you need to have some adapters installed.
363334
364335There 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
664633If 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
666635meaningful 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.
826795To make this easier, Vimspector supplies a little utility for listing PIDs. It's
827796like a very very simple clone of ` ps ` but works on all the supported platforms.
828797See [ 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
836803If Vimspector is able to find this app, it will try to list all processes owned
837804by the current user by default.
838805
839806Alternatively (preferably), you can use a special form of variable expansion
840807called ` ${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
843810For example:
844811
@@ -1156,7 +1123,7 @@ the [breakpoints window](#breakpoints-window).
11561123
11571124Currently, instruction breakpoints are automatically cleared when the debug
11581125session 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"
21512118php < 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.
26702650In many cases you will want to rebuild your project before starting a new debugging
26712651session. Vimspector is not a task manager and implementing this functionality
26722652is 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 )
26742654to achieve similar functionality.
26752655
26762656
0 commit comments