Skip to content

Commit

Permalink
Add troubleshooting guide
Browse files Browse the repository at this point in the history
Also make sure that the gadget installer and other docs are included in
the tarball installation.
  • Loading branch information
puremourning committed Apr 5, 2020
1 parent c3105cf commit 980b80e
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 7 deletions.
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -10,6 +10,22 @@ forms, such as:

At all times the [code of conduct](#code-of-conduct) applies.

## Troubleshooting

It's not completely trivial to configure Vimspector and there is a fairly large
amount of documentation. I know full well that documentation isn't everything,
so the first step in troubleshooting is to try a sample project that's known to
work, to check if the problem is your project configuration rather than an
actual bug.

Therefore before raising an issue for a supported language, please check with
the sample projects in `support/test/<language>` and `tests/testdata/` to see if
the problem is with your project settings, rather than with vimspector.

Information on these is in [the README](README.md#trying-it-out).

If in doubt, ask on Gitter.

## Diagnostics

Whenever reporting any type of fault, or difficulty in making the plugin
Expand Down
30 changes: 24 additions & 6 deletions README.md
Expand Up @@ -255,12 +255,6 @@ packadd! vimspector

See support/doc/example_vimrc.vim.

Also, if you want to try out vimspector without changing your vim config, run:

```
vim -Nu /path/to/vimspector/tests/vimrc --cmd "let g:vimspector_enable_mappings='HUMAN'"
```

## Install some gadgets

There are a couple of ways of doing this, but ***using `install_gadget.py` is
Expand Down Expand Up @@ -380,6 +374,30 @@ Vimspector will also load any fies matching:
format as `.gadgets.json` but are not overwritten when running
`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.

# About

## Background
Expand Down
9 changes: 8 additions & 1 deletion make_package
Expand Up @@ -16,13 +16,20 @@ mkdir -p ${PACK}
pushd ${PACK}
mkdir -p vimspector/opt/vimspector
pushd vimspector/opt/vimspector
for d in autoload plugin python3 vendor doc; do
for d in autoload plugin python3 vendor doc support; do
if [[ -d ${ROOT}/$d ]]; then
cp -r ${ROOT}/$d .
fi
done
mkdir -p gadgets
cp -r ${ROOT}/gadgets/${OS} gadgets/
for f in install_gadget.py \
CODE_OF_CONDUCT.md \
CONTRIBUTING.md \
LICENCE \
README.md; do
cp ${ROOT}/${f} .
done
popd
popd

Expand Down

0 comments on commit 980b80e

Please sign in to comment.