Closed kjnez closed 4 months ago
Can't listen for client connections: [Errno 98] Address already in use
import debugpy
debugpy.listen(("localhost", 5678)) # << This port is already taken
I would not recommend debugging by importing debugpy if it's not strictly necessary, it's much easier to let debugpy launch the application you want to debug.
Thanks for the clarification. Maybe consider adding it to README or the wiki? When I read the descriptions there I never thought what you mentioned above was the preferred way.
I followed https://github.com/svaante/dape/issues/23 using the simple example in here. It seems to be working for me when I issue "M-x dape" directly in a buffer. But I failed to attach to it when running python in terminal and issue "M-x dape" in Emacs. The error is:
More generally, if I have a more complex project like a django project, I can insert
breakpoint()
in a python file and when running the server, in terminal it will stop at the breakpoint that I set. How to achieve that with Dape? I tried to do the same thing as in the simple example above, but got the same error.