Open ztlevi opened 3 years ago
We don't support docker the same way VSCode does, so "type": "docker" is invalid (this is a missing feature of dap-mode
).
Got it. Thanks. I'll change this to feature request.
Roadmap:
:_dap-server
property for use in dap-start-debugging-noexpand
"type"
in dap-docker.el
.However, note that dap-mode
might still suffice for your use-case: debugpy
supports attach requests. If you can start a debugpy server from within your docker application and if you can expose the required ports, you could use an attach configuration (as in VSCode). To do this, you'll need to enable debugpy
for dap-mode
:
(setq dap-python-debugger 'debugpy)
@nbfalcon Thanks.
I am able to get vscode debugpy working using this setup.
But when I use the same launch config in emacs and set the dap-python-debugger to debugpy, it pops No message handler for debugpyWaitingForServer
error and the debug session is killed.
Do you know how to make it working?
The message is strange, given that we have a message handler for debugpyWaitingForServer
(no typo?) in dap-python
. Try the following launch configuration (one item in "configurations": ...):
{
"name": "Debug",
"type": "python",
"port": 5768,
"host": "localhost",
"request": "attach"
}
@nbfalcon Same error. I need to use --wait-for-client
to attach to it BTW.
You can easily reproduce this by clone this repo.
@ztlevi you have dap-python-debugger
as debugpy
in your current session, right? The no handler for... is just a message, not an error.
@nbfalcon Right. But the session just end without attaching...
I got this message eventually.
Warning (emacs): Initialize request failed: Timed out waiting for debug server to connect.
Remote debugging indeed doesn't work for python. I'll need to investigate...
Got it. Thanks!
This would be a super useful feature for working with Azure Functions. I'll watch this thread closely and would be happy to help out with any testing/documentation, etc.
Hi,
I'm trying to use the vscode's docker debug config to run the app.
My basic vscode debug template is over here. Everything is pretty much learned from here.
I'm able to use vscode to set breakpoint in app.py and run "Docker: Python - General" to debug it. But for emacs, it pops the following error.
It turns out dap-mode couldn't handle docker on the fly. Maybe there is a missing feature for dap? Any idea?
Thanks!