Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion dap-python.el
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ as the pyenv version then also return nil. This works around https://github.com/
"Populate CONF with the required arguments."
(let* ((host "localhost")
(debug-port (dap--find-available-port))
(python-executable (dap-python--pyenv-executable-find dap-python-executable))
(python-executable (plist-get conf :python-exec-path))
(python-args (or (plist-get conf :args) ""))
(program (or (plist-get conf :target-module)
(plist-get conf :program)
Expand Down Expand Up @@ -237,6 +237,7 @@ as the pyenv version then also return nil. This works around https://github.com/
:module nil
:program nil
:request "launch"
:python-exec-path (dap-python--pyenv-executable-find dap-python-executable)
:name "Python :: Run file (buffer)"))

(dap-register-debug-template "Python :: Run pytest (buffer)"
Expand All @@ -246,6 +247,7 @@ as the pyenv version then also return nil. This works around https://github.com/
:program nil
:module "pytest"
:request "launch"
:python-exec-path (dap-python--pyenv-executable-find dap-python-executable)
:name "Python :: Run pytest (buffer)"))

(dap-register-debug-provider "python-test-at-point" 'dap-python--populate-test-at-point)
Expand All @@ -254,6 +256,7 @@ as the pyenv version then also return nil. This works around https://github.com/
:args ""
:module "pytest"
:request "launch"
:python-exec-path (dap-python--pyenv-executable-find dap-python-executable)
:name "Python :: Run pytest (at point)"))

(provide 'dap-python)
Expand Down