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

1 Answer 1

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"))
Sign up to request clarification or add additional context in comments.

3 Comments

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?
@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
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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.