[[https://melpa.org/#/dap-mode][file:https://melpa.org/packages/dap-mode-badge.svg]]
[[https://stable.melpa.org/#/dap-mode][file:https://stable.melpa.org/packages/dap-mode-badge.svg]]
[[http://spacemacs.org][file:https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg]]
[[https://github.com/emacs-lsp/dap-mode/actions][file:https://github.com/emacs-lsp/dap-mode/workflows/CI/badge.svg]]
[[https://discord.gg/swuxy5AAgT][file:https://discordapp.com/api/guilds/789885435026604033/widget.png?style=shield]]

* dap-mode
** Table of Contents :TOC_4_gh:noexport:
- [[#dap-mode][dap-mode]]
  - [[#summary][Summary]]
    - [[#project-status][Project status]]
  - [[#usage][Usage]]
  - [[#features][Features]]
  - [[#configuration][Configuration]]
  - [[#gallery][Gallery]]
  - [[#extending-dap-with-new-debug-servers][Extending DAP with new Debug servers]]
  - [[#links][Links]]
  - [[#acknowledgments][Acknowledgments]]

** Summary
  Emacs client/library for [[https://microsoft.github.io/debug-adapter-protocol/][Debug Adapter Protocol]] is a wire protocol for
  communication between client and Debug Server. It's similar to the [[https://github.com/Microsoft/language-server-protocol][LSP]] but
  provides integration with debug server.
*** Project status
   The API considered unstable until 1.0 release is out. It is tested against
   Java, Python, Ruby, Elixir and LLDB (C/C++/Objective-C/Swift).
** Usage
  The main entry points are ~dap-debug~ and ~dap-debug-edit-template~. The first
  one asks for a registered debug template and starts the configuration using
  the default values for that particular configuration. The latter creates a
  debug template which could be customized before running.
  ~dap-debug-edit-template~ will prepare a template deceleration inside a
  temporary buffer. You should execute this code using ~C-M-x~ for the changes to
  apply. You should also copy this code into your Emacs configuration if you wish to
  make it persistent.

  dap-mode also provides a [[https://github.com/abo-abo/hydra][hydra]] with ~dap-hydra~. You can automatically trigger
  the hydra when the program hits a breakpoint by using the following code.

  #+BEGIN_SRC elisp
    (add-hook 'dap-stopped-hook
              (lambda (arg) (call-interactively #'dap-hydra)))
  #+END_SRC
** [[https://emacs-lsp.github.io/dap-mode/page/features/][Features]]
** [[https://emacs-lsp.github.io/dap-mode/page/configuration/][Configuration]]
** [[https://emacs-lsp.github.io/dap-mode/page/gallery][Gallery]]
** [[https://emacs-lsp.github.io/dap-mode/page/adding-debug-server][Extending DAP with new Debug servers]]
** Links
  - [[https://code.visualstudio.com/docs/extensionAPI/api-debugging][Debug Adapter Protocol]]
  - [[https://github.com/emacs-lsp/lsp-java][LSP Java]]
  - [[https://microsoft.github.io/debug-adapter-protocol/implementors/adapters/][Debug Adapter Protocol Server Implementations]]
** Acknowledgments
  - [[https://github.com/danielmartin][Daniel Martin]] - LLDB integration.
  - [[https://github.com/kiennq][Kien Nguyen]] - NodeJS debugger, Edge debuggers, automatic extension installation.
  - [[https://github.com/Ladicle][Aya Igarashi]] - Go debugger integration.
  - [[https://github.com/nbfalcon][Nikita Bloshchanevich]] - launch.json support (+ variable expansion), debugpy
    support, (with some groundwork by yyoncho) runInTerminal support, various
    bug fixes.
