Document exception breakpints

This commit is contained in:
Ben Jackson 2020-01-28 08:45:14 +00:00
commit 23b3bb719b
2 changed files with 50 additions and 1 deletions

View file

@ -974,8 +974,10 @@ sign define vimspectorPC text=🔶 texthl=SpellBad
necessarily be easy to work out what to put in the `.vimspector.json`. As you
can see above, some of the servers aren't really editor agnostic, and require
very-specific unique handling.
3. How do i stop it starting a new Terminal.app on macOS? See [this
3. How do I stop it starting a new Terminal.app on macOS? See [this
comment](https://github.com/puremourning/vimspector/issues/90#issuecomment-577857322)
4. Can I specify answers to the annoying questions about exception breakpoints
in my `vimspector.json` ? Yes, see [here][vimspector-ref-exception].
# License
@ -991,3 +993,4 @@ Copyright © 2018 Ben Jackson
[delve-install]: https://github.com/go-delve/delve/tree/master/Documentation/installation
[vimspector-ref]: https://puremourning.github.io/vimspector/configuration.html
[vimspector-ref-var]: https://puremourning.github.io/vimspector/configuration.html#replacements-and-variables
[vimspector-ref-exception]: https://puremourning.github.io/vimspector/configuration.html#exception-breakpoints

View file

@ -6,6 +6,23 @@ title: Configuration
This document defines the supported format for project and adapter configuration
for Vimspector.
<!--ts-->
* [Concepts](#concepts)
* [Debug adapter configuration](#debug-adapter-configuration)
* [Debug profile configuration](#debug-profile-configuration)
* [Replacements and variables](#replacements-and-variables)
* [Configuration Format](#configuration-format)
* [Files and locations](#files-and-locations)
* [Adapter configurations](#adapter-configurations)
* [Debug configurations](#debug-configurations)
* [Exception breakpionts](#exception-breakpionts)
* [Predefined Variables](#predefined-variables)
* [Appendix: Editor configuration](#appendix-editor-configuration)
<!-- Added by: ben, at: Tue 28 Jan 2020 08:47:40 GMT -->
<!--te-->
## Concepts
As Vimspector supports debugging arbitrary projects, you need to tell it a few
@ -235,6 +252,35 @@ typical example looks like this:
}
```
### Exception breakpionts
Debug adapters have arbitrary configuration for exception breakpoints. Normally
this is presented as a series of question to the user on startnig the debug
session. The question includes the name of the exception breakpoint option,
the default and the list of valid responses (usually `Y` or `N`).
You can pre-configure the answers to these questions in the `breakpoints`
section of the debug configuration. For each question, take the name provided
and configure the response `exception` mapping in the `breakpoints` mapping. If
the configured response is empty string, the debug adapter default will be used.
Referring to the above example, the following tells the debug adapter to use the
default value for `caught` exceptoins and to break on `uncaught` exception:
```
{
"configurations": {
"example-debug-configuration": {
"adapter": "example-adapter-name",
"breakpoints": {
"exception": {
"caught": "",
"uncaught": "Y"
}
},
...
```
## Predefined Variables
The following variables are provided: