0

I could use some help in setting up a solution for debugging a Odoo 14 project with Emacs dap mode

I have debug py in the dev dependencies of my odoo project but what am I supposed to do with it ?

I made this hypothesis

python -m debugpy --listen 1096 --wait-for-client  /path/to/odoo/odoo-bin -c ./plusinn.cfg

but then I read (in the issue tracker) that dap mode doesn't support requets of type "attach" for python processes

user1632812
  • 431
  • 3
  • 16

1 Answers1

1

Should work if you register like this,

(require 'dap-python)
(setq dap-python-debugger 'debugpy)
(dap-register-debug-template "attach debugpy"
  (list :type "python"
        :port <your debugpy port>
        :request "attach"
        :name "attach debugpy"))
  • Remember that Stack Overflow isn't just intended to solve the immediate problem, but also to help future readers find solutions to similar problems, which requires understanding the underlying code. This is especially important for members of our community who are beginners, and not familiar with the syntax. Given that, **can you [edit] your answer to include an explanation of what you're doing** and why you believe it is the best approach? – Jeremy Caney May 24 '23 at 00:16
  • 1
    @JeremyCaney Absolutely could, might take me a few days to get around to it but I just wanted to get this quick answer out there while I had time. Thanks – Zachary Hanham May 24 '23 at 01:41
  • 1
    Actually since my answer is more applicable to a wide range of questions (how to set up an attach to debugpy process configuration for dap-mode), I feel like this question could maybe be marked as a duplicate (assuming there is another similar question/answer out there). – Zachary Hanham May 24 '23 at 01:46