'Dap-mode with doom emacs?
I recently switched from Vscode which has an incredible debugging experience that I’m used to.
For example, I can start an app locally, place breakpoints and run a curl request and vscode automatically puts you into the debug console where you can interpret your code
I want this workflow in emacs because Im loving everything else that emacs has to offer. However, I have to switch to vscode to actually get work done and have a good debugging experience
My current emacs configuration:
- pipenv-activate works
- projectile works
- lsp enabled
- pyright working and i get autocomplete etc
- restclient
- pytest works
But enabling the built-in debugger in .doom.d/init.el gets me nothing. Trying to M-x toggle breakpoint does nothing and gives me an error in the mini buffer
I’ve tried to configure dap-mode using a few different examples online but none work for me. Does anyone have a similar setup and know how to configure dap-mode with the default doom emacs config structure? Or do you suggest something other than dap mode?
Solution 1:[1]
You can check helping web pages:
https://docs.doomemacs.org/latest/modules/tools/debugger/
https://emacs-lsp.github.io/dap-mode/page/configuration/
In init.el, add :
In: tools :
debugger +lsp)
For example for me in C++, I need to do :
In the config.el, add:
;; to debug with DAP-MODE
(setq dap-auto-configure-mode t)
(requires 'dap-cpptools)
Next :
M-x -> “dap-cpptools-setup” (once)
M-x -> “dap-debug-edit-template” (indicate the binary path)
Template is open, I need to complete to specify the binary
M-x -> “eval-buffer” (to be done on the template buffer to use it)
M-x -> “dap-debug” (launches the debug)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | cool coyote |
