-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dap-python: Support attach mode #384
base: master
Are you sure you want to change the base?
Conversation
- New configuration attribute `processId` is added. This name is picked to provide a consistent interface for both debugpy and ptvsd as well as make it works with launch.json naturally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
dap-python.el
Outdated
@@ -205,14 +206,17 @@ overriden in individual `dap-python' launch configurations." | |||
(when (sequencep python-args) | |||
(setq python-args (mapconcat #'shell-quote-argument python-args " "))) | |||
(plist-put conf :program-to-start | |||
(format "%s%s -m ptvsd --wait --host %s --port %s%s %s %s" | |||
(format "%s%s -m ptvsd --wait --host %s --port %s %s" | |||
(or dap-python-terminal "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(or dap-python-terminal "") | |
(or (and dap-python-terminal (concat " " dap-python-terminal) "")) |
@@ -205,14 +206,17 @@ overriden in individual `dap-python' launch configurations." | |||
(when (sequencep python-args) | |||
(setq python-args (mapconcat #'shell-quote-argument python-args " "))) | |||
(plist-put conf :program-to-start | |||
(format "%s%s -m ptvsd --wait --host %s --port %s%s %s %s" | |||
(format "%s%s -m ptvsd --wait --host %s --port %s %s" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nbfalcon not part of this review, but do we support vterm here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yyoncho we could use vterm here, but not with the facilities that I have already implemented for "runInTerminal", as they depend on a debug-session. However, adding vterm support to dap-debug shouldn't be that much effort (basically let
-bind vterm-shell to :program-to-start and then call (vterm)). I could implement it if I have some more spare time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be max. 20 lines of Elisp, probably 4-10.
Co-authored-by: Nikita Bloshchanevich <[email protected]>
Any chance that this will be merged? |
processId
is added.This name is picked to provide a consistent interface for both debugpy
and ptvsd as well as make it works with launch.json naturally.