Back to Spacevim

SpaceVim debug layer

docs/layers/debug.md

2.4.03.0 KB
Original Source

Available Layers >> debug

<!-- vim-markdown-toc GFM --> <!-- vim-markdown-toc -->

Description

This layer provides debug workflow for SpaceVim. All of the functionality is based on vim-vebugger.

Install

To use this configuration layer, add the following snippet to your custom configuration file.

toml
[[layers]]
  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 BindingDescription
SPC d llaunch the debugger
SPC d cContinue the execution
SPC d bToggle a breakpoint for the current line
SPC d BClear all breakpoints
SPC d ostep over
SPC d istep into functions
SPC d Ostep out of current function
SPC d e sEvaluate and print the selected text
SPC d e eEvaluate the <cword> under the cursor
SPC d e SExecute the selected text
SPC d kTerminates the debugger

Debug Transient State

key bindings are too long? use SPC d . to open the debug transient state:

Using vimspector

Key BindingDescription
SPC d claunch-or-continue-debugger
SPC d rrestart-debugger-with-the-same-config
SPC d xrun-to-cursor
SPC d ppause-debugger
SPC d btoggle-line-breakpoint
SPC d Bclear-all-breakpoints
SPC d ostep-over
SPC d istep-into-functions
SPC d Ostep-out-of-current-function
SPC d umove-up-a-frame
SPC d dmove-down-a-frame
SPC d kterminate-the-debugger
SPC d eevaluate-cursor-symbol-or-selection

Debug Transient State

Key BindingDescription
cContinue execution
uMove up a frame
dMove down a frame
ostep over
istep into functions
Ostep out of current function
kTerminates the debugger