Skip to content

Attach to debugpy #846

Answered by mfussenegger
AckslD asked this question in Q&A
Feb 1, 2023 · 2 comments · 5 replies
Discussion options

You must be logged in to vote

How does your adapter definition look like? debugpy is a bit special in regards to the attach handling. For most adapters you still launch the debug-adapter the same way, and then the debug-adapter attaches to the process. For debugpy the process using debugpy.listen() (or when using python -m debugpy --listen ...) launches the service that speaks DAP.

Because of that you'll need to switch over to a adapter definition of type server. I'd recommend to use nvim-dap-python which does that:

https://github.com/mfussenegger/nvim-dap-python/blob/d4400d075c21ed8fb8e8ac6a5ff56f58f6e93531/lua/dap-python.lua#L130-L153

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@AckslD
Comment options

Answer selected by AckslD
Comment options

You must be logged in to vote
4 replies
@AckslD
Comment options

@verajosemanuel
Comment options

@AckslD
Comment options

@AM-I-Human
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants