dap-mode
dap-mode copied to clipboard
Debug adapter exits abnormally with code 1 during python dap-debug at breakpoint
Hi there,
Attempting to run dap-debug appears to work correctly but very briefly, opening up a lot of windows and then closing them all again. When the code hits a breakpoint, it seems to exit dap-mode.
The following messages are produced:
Python : : Run File (buffer)<1> server log: Debug Adapter exited abnormally with code 1
sterr buffer: WARNING - pylsp_jsonrpc.endpoint - Received cancel notification for unknown message id 2
Some other information:
- GNU Emacs 28.1
- Ubuntu 20.04
- dap-mode 20220612.1850
- lsp-mode 20220616.425
I'm sorry I can't be more helpful initially, I am new to emacs and very new to dap-mode. Any help would be greatly appreciated, thank you
EDIT I have managed to fix it by changing my config file, and changing my debugger to debugpy, as follows
(use-package lsp-mode
:hook
((python-mode . lsp-deferred))
:commands lsp lsp-deferred)
;; optionally
(use-package lsp-ui :commands lsp-ui-mode)
(use-package dap-mode
:after lsp-mode
:commands dap-debug
:hook ((python-mode . dap-ui-mode) (python-mode . dap-mode))
:config
(require 'dap-python)
(setq dap-python-debugger 'debugpy))
I guess https://github.com/emacs-lsp/dap-mode/issues/625 ?