https://github.com/svaante/dape#
Given that eglot has been part of the core emacs, I believe this is a long lasting wish for a lot of emacsers that has finally been fulfilled. (a stand alone DAP implementation that does not rely on LSP-mode)
https://github.com/svaante/dape#
Given that eglot has been part of the core emacs, I believe this is a long lasting wish for a lot of emacsers that has finally been fulfilled. (a stand alone DAP implementation that does not rely on LSP-mode)
How would you attach a DAP python debugger to a running instance of (i)Python? Is there some import debugpy; debugpy.start() command or similar?
There is
In python:
Then add the following configuration to dape
Supposedly there is a way to attach by pid with
python3 -m debugpy --listen localhost:5678 --pid 12345
, but that failed, both on osx and linux.Yes, I also tried to use
--pid
to attach to a python process, and failed too.Did you either succeed with debugpy.listen()? Is that suitable to call interactively then quit (like iPDB)?
Does this help…
https://github.com/microsoft/debugpy#attaching-to-a-running-process-by-id
I believe this is out of the scope of the DAP protocol, I believe even VSCode cannot do it based on my understanding.
If you want to debug a running session, just use ipdb or pdb.
No it isn’t. DAP can definitely do this. It can even attach to a PID.
This is what I complained about it in my post: I could not get dape to work with this.
I see, thanks for correcting me.
I see that this post https://github.com/Microsoft/vscode-python/issues/1078 suggested that debugpy can already attach to a local Python process.
Seems like in-process debuggers like iPDB are far more practical for interactive debugging of long running shells.
I see, thanks for correcting me.
I see that this post https://github.com/Microsoft/vscode-python/issues/1078 suggested that debugpy can already attach to a local Python process.