From 18e3252034319adcff74e11b6f7e7568237cecec Mon Sep 17 00:00:00 2001 From: Grafcube Date: Wed, 2 Feb 2022 11:43:14 +0530 Subject: [PATCH] docs(debug): add keybinds doc for vimspector --- docs/layers/debug.md | 45 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/docs/layers/debug.md b/docs/layers/debug.md index 453c08048..541914ee4 100644 --- a/docs/layers/debug.md +++ b/docs/layers/debug.md @@ -9,7 +9,10 @@ description: "This layer provides debug workflow support in SpaceVim" - [Description](#description) - [Install](#install) +- [Configuration](#configuration) - [Key bindings](#key-bindings) + - [Using vim-debug](#using-vim-debug) + - [Using vimspector](#using-vimspector) @@ -26,8 +29,20 @@ To use this configuration layer, add the following snippet to your custom config name = "debug" ``` +## Configuration + +Vimspector can be used as the debugger by setting the configuration. + +```toml +[[layers]] + name = "debug" + debugger_plugin = "vimspector" +``` + ## Key bindings +### Using vim-debug + | Key Binding | Description | | ----------- | ---------------------------------------- | | `SPC d l` | launch the debugger | @@ -47,3 +62,33 @@ To use this configuration layer, add the following snippet to your custom config key bindings are too long? use `SPC d .` to open the debug transient state: ![Debug Transient State](https://user-images.githubusercontent.com/13142418/33996076-b03c05bc-e0a5-11e7-90fd-5f31e2703d7e.png) + +### Using vimspector + +| Key Binding | Description | +| ----------- | ------------------------------------- | +| `SPC d c` | launch-or-continue-debugger | +| `SPC d r` | restart-debugger-with-the-same-config | +| `SPC d x` | run-to-cursor | +| `SPC d p` | pause-debugger | +| `SPC d b` | toggle-line-breakpoint | +| `SPC d B` | clear-all-breakpoints | +| `SPC d o` | step-over | +| `SPC d i` | step-into-functions | +| `SPC d O` | step-out-of-current-function | +| `SPC d u` | move-up-a-frame | +| `SPC d d` | move-down-a-frame | +| `SPC d k` | terminate-the-debugger | +| `SPC d e` | evaluate-cursor-symbol-or-selection | + +**Debug Transient State** + +| Key Binding | Description | +| ----------- | ---------------------------- | +| `c` | Continue execution | +| `u` | Move up a frame | +| `d` | Move down a frame | +| `o` | step over | +| `i` | step into functions | +| `O` | step out of current function | +| `k` | Terminates the debugger |