Skip to content

Basic set up #401

Open
Open
@excalamus

Description

@excalamus

What is the basic setup?

I have done the following:

  1. Install the latest dap-mode (cbe6549) via straight:
(use-package dap-mode
  :config
  (require 'dap-python)
  (setq dap-python-debugger 'debugpy)
  )
  1. 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 
  1. 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?")
  1. Activate virtual environment within Emacs via pyvenv-activate
  2. Call dap-auto-configure-mode within the debugme.py buffer
  3. Call M-x dap-debug <RET> Python :: Run file (buffer)

This brings up the beautiful debug screen:

image

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions