2017-07-18 21:54:00 +00:00
|
|
|
#+TITLE: debug layer
|
|
|
|
|
2019-05-02 21:49:30 +00:00
|
|
|
#+TAGS: layer|tool
|
|
|
|
|
2017-07-18 21:54:00 +00:00
|
|
|
[[file:img/debug.png]]
|
|
|
|
|
2019-05-07 20:05:06 +00:00
|
|
|
* Table of Contents :TOC_5_gh:noexport:
|
2017-07-18 21:54:00 +00:00
|
|
|
- [[#description][Description]]
|
|
|
|
- [[#features][Features:]]
|
|
|
|
- [[#install][Install]]
|
|
|
|
- [[#enable-additional-debuggers][Enable additional debuggers]]
|
|
|
|
- [[#key-bindings][Key bindings]]
|
|
|
|
- [[#major-mode][Major Mode]]
|
|
|
|
- [[#debugger][Debugger]]
|
|
|
|
|
|
|
|
* Description
|
2018-12-04 02:47:48 +00:00
|
|
|
This layer adds interactive debuggers for multiple languages using [[https://github.com/realgud/realgud][realgud]].
|
2017-07-18 21:54:00 +00:00
|
|
|
|
|
|
|
** Features:
|
|
|
|
- Modern rewrite of the Emacs GUD debugger family
|
|
|
|
- Visual interface including breakpoint and line indicators
|
|
|
|
- Advanced features like stack frame navigation and mouse support
|
|
|
|
- Extensible framework for [[https://github.com/realgud/realgud/wiki/How-to-add-a-new-debugger][adding]] your own external debuggers
|
|
|
|
|
|
|
|
* Install
|
|
|
|
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
|
|
|
add =debug= to the existing =dotspacemacs-configuration-layers= list in this
|
|
|
|
file.
|
|
|
|
|
|
|
|
** Enable additional debuggers
|
|
|
|
Language specific debuggers are added by the respective layers. If you want to
|
|
|
|
add additional debuggers, add them to the =debug-additional-debuggers= variable.
|
2020-04-26 02:57:12 +00:00
|
|
|
Make sure that your debugger is compatible by checking [[https://github.com/realgud/realgud/wiki/Debuggers-Available][here]].
|
2017-07-18 21:54:00 +00:00
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(setq-default dotspacemacs-configuration-layers
|
|
|
|
'((debug :variables debug-additional-debuggers '("remake"))))
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
* Key bindings
|
|
|
|
** Major Mode
|
|
|
|
|
2018-12-05 03:03:03 +00:00
|
|
|
| Key binding | Description |
|
2018-09-19 03:54:47 +00:00
|
|
|
|-------------+-----------------|
|
|
|
|
| ~SPC m d d~ | open cmd buffer |
|
2017-07-18 21:54:00 +00:00
|
|
|
|
|
|
|
** Debugger
|
|
|
|
|
2018-12-05 03:03:03 +00:00
|
|
|
| Key binding | Description |
|
2018-09-19 03:54:47 +00:00
|
|
|
|-------------+----------------------|
|
|
|
|
| ~bb~ | set break |
|
|
|
|
| ~bc~ | clear break |
|
|
|
|
| ~bd~ | delete break |
|
|
|
|
| ~bs~ | disable break |
|
|
|
|
| ~be~ | enable break |
|
|
|
|
| ~c~ | continue |
|
|
|
|
| ~i~ | step into |
|
|
|
|
| ~J~ | jump to current line |
|
|
|
|
| ~o~ | step out |
|
|
|
|
| ~q~ | quit debug |
|
|
|
|
| ~r~ | restart |
|
|
|
|
| ~s~ | step over |
|
|
|
|
| ~S~ | goto cmd buffer |
|
|
|
|
| ~v~ | eval variable |
|