Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

f279801
Copy link
Contributor

@f279801 f279801 commented Oct 11, 2020

  • 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.

- 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.
Copy link
Member

@nbfalcon nbfalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

docs/page/configuration.md Outdated Show resolved Hide resolved
docs/page/configuration.md Outdated Show resolved Hide resolved
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 "")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(or dap-python-terminal "")
(or (and dap-python-terminal (concat " " dap-python-terminal) ""))

dap-python.el Outdated Show resolved Hide resolved
@@ -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"
Copy link
Member

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?

Copy link
Member

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.

Copy link
Member

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.

@dvzubarev
Copy link
Contributor

Any chance that this will be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants