1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 05:30:07 +08:00
SpaceVim/docs/layers/debug.md

51 lines
1.6 KiB
Markdown
Raw Normal View History

2017-12-14 21:30:20 +08:00
---
title: "SpaceVim debug layer"
description: "This layer provide debug workflow support in SpaceVim"
---
2018-06-23 14:37:41 +08:00
# [Available Layers](../) >> debug
2017-12-14 21:30:20 +08:00
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Install](#install)
- [Key bindings](#key-bindings)
<!-- vim-markdown-toc -->
## Description
This layer provide a debug workflow for SpaceVim. All of the function is based on [vim-vebugger](https://github.com/idanarye/vim-vebugger).
## Install
2018-06-23 14:37:41 +08:00
To use this configuration layer, add following snippet to your custom configuration file.
```toml
[[layers]]
name = "debug"
```
2017-12-14 21:30:20 +08:00
## Key bindings
| Key Binding | Description |
| ----------- | ---------------------------------------- |
| `SPC d l` | launching debugger |
| `SPC d c` | Continue the execution |
| `SPC d b` | Toggle a breakpoint for the current line |
| `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 e s` | Evaluate and print the selected text |
| `SPC d e e` | Evaluate the `<cword>` under the cursor |
| `SPC d e S` | Execute the selected text |
| `SPC d k` | Terminates the debugger |
2017-12-14 21:58:22 +08:00
**Debug Transient State**
key bindings is too long? use `SPC d .` to open the debug transient state:
2017-12-14 22:01:23 +08:00
![Debug Transient State](https://user-images.githubusercontent.com/13142418/33996076-b03c05bc-e0a5-11e7-90fd-5f31e2703d7e.png)