Skip to content

Commit

Permalink
Replace ptvsd with debugpy to match modern VS Code (#7234)
Browse files Browse the repository at this point in the history
  • Loading branch information
eradman authored Nov 26, 2024
1 parent c12e68f commit de49b73
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 40 deletions.
2 changes: 1 addition & 1 deletion bin/docker-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ help() {
echo ""
echo "shell -- open shell"
echo "dev_server -- start Flask development server with debugger and auto reload"
echo "debug -- start Flask development server with remote debugger via ptvsd"
echo "debug -- start Flask development server with remote debugger via debugpy"
echo "create_db -- create database tables"
echo "manage -- CLI to manage redash"
echo "tests -- run tests"
Expand Down
73 changes: 37 additions & 36 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ wtforms = "2.2.1"
xlsxwriter = "1.2.2"
tzlocal = "4.3.1"
pyodbc = "5.1.0"
debugpy = "^1.8.9"

[tool.poetry.group.all_ds]
optional = true
Expand Down Expand Up @@ -156,7 +157,6 @@ jwcrypto = "1.5.6"
mock = "5.0.2"
pre-commit = "3.3.3"
ptpython = "3.0.23"
ptvsd = "4.3.2"
pytest-cov = "4.1.0"
watchdog = "3.0.0"
ruff = "0.0.289"
Expand Down
5 changes: 3 additions & 2 deletions redash/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@


if os.environ.get("REMOTE_DEBUG"):
import ptvsd
import debugpy

ptvsd.enable_attach(address=("0.0.0.0", 5678))
debugpy.listen(("0.0.0.0", 5678))
debugpy.wait_for_client()


def setup_logging():
Expand Down

0 comments on commit de49b73

Please sign in to comment.