Open
Description
What is the basic setup?
I have done the following:
(use-package dap-mode
:config
(require 'dap-python)
(setq dap-python-debugger 'debugpy)
)
- Install
debugpy
:
(venv) user@debian:~/projects/dap$ python -V && pip list
Python 3.7.3
Package Version
------------- -------
debugpy 1.1.0
pip 18.1
pkg-resources 0.0.0
setuptools 40.8.0
- Create a test script with a
breakpoint()
:
# debugme.py
import sys
class Hello:
def say_something(self, thing):
breakpoint()
print("I say,", thing)
if __name__ == '__main__':
hi = Hello()
hi.say_something("what's up?")
- Activate virtual environment within Emacs via
pyvenv-activate
- Call
dap-auto-configure-mode
within thedebugme.py
buffer - Call
M-x dap-debug <RET> Python :: Run file (buffer)
This brings up the beautiful debug screen:
In the minibuffer is a message about "No message handler for module". Checking C-h e
, I see:
No message handler for process
No message handler for module [2 times]
- Is this setup appropriate?
- Are the error messages expected?
Debugging appears to function as expected.
These may seem like obvious questions, however as a newbie to DAP, I found ways to struggle before arriving at the above. I understand debugpy
support is quite new and so the documentation doesn't yet reflect it. If things are stable enough, I would be happy to contribute to the docs.
Metadata
Metadata
Assignees
Labels
No labels