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, Flask support #724

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

dap-python, Flask support #724

wants to merge 3 commits into from

Conversation

DJManas
Copy link

@DJManas DJManas commented Feb 28, 2023

Now it should be all ok. Only thing left is what with the deprecated ptvsd, should I implement it also?

@codingquark
Copy link

I tried the changes PR makes in my emacs, with the following .vscode/launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python App",
            "type": "python",
            "request": "launch",
            "module": "flask",
            "env": {
		"FLASK_APP": "app.py",
		"FLASK_DEBUG": "0"
            },
            "args": [
		"run",
		"--no-debugger",
		"--no-reload"
            ],
            "jinja": false,
            "justMyCode": true
        }
    ]
}

I use direnv, and had to override dap-mode function like so:

(defun dap-python--pyenv-executable-find (command)
    (executable-find "python"))

Full config:

(use-package dap-mode
  :after lsp-mode
  :commands dap-debug
  :custom
  (setq dap-python-debugger 'debugpy)
  (setq dap-python-terminal "vterm")
  :config
  (dap-auto-configure-mode)
  (require 'dap-node)
  (require 'dap-python)
  ;; no support for direnv, the function uses pyenv’s modules if pyenv
  ;; is found in path
  (defun dap-python--pyenv-executable-find (command)
    (executable-find "python")))

Pleased to report that things work well!

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

2 participants