Skip to content

Commit 55fb792

Browse files
committed
Replace ptvsd with debugpy to match modern VS Code
Based on #7110
1 parent c12e68f commit 55fb792

File tree

4 files changed

+42
-40
lines changed

4 files changed

+42
-40
lines changed

bin/docker-entrypoint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ help() {
6767
echo ""
6868
echo "shell -- open shell"
6969
echo "dev_server -- start Flask development server with debugger and auto reload"
70-
echo "debug -- start Flask development server with remote debugger via ptvsd"
70+
echo "debug -- start Flask development server with remote debugger via debugpy"
7171
echo "create_db -- create database tables"
7272
echo "manage -- CLI to manage redash"
7373
echo "tests -- run tests"

poetry.lock

Lines changed: 37 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ wtforms = "2.2.1"
8686
xlsxwriter = "1.2.2"
8787
tzlocal = "4.3.1"
8888
pyodbc = "5.1.0"
89+
debugpy = "^1.8.9"
8990

9091
[tool.poetry.group.all_ds]
9192
optional = true
@@ -156,7 +157,6 @@ jwcrypto = "1.5.6"
156157
mock = "5.0.2"
157158
pre-commit = "3.3.3"
158159
ptpython = "3.0.23"
159-
ptvsd = "4.3.2"
160160
pytest-cov = "4.1.0"
161161
watchdog = "3.0.0"
162162
ruff = "0.0.289"

redash/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@
1818

1919

2020
if os.environ.get("REMOTE_DEBUG"):
21-
import ptvsd
21+
import debugpy
2222

23-
ptvsd.enable_attach(address=("0.0.0.0", 5678))
23+
debugpy.listen(("0.0.0.0", 5678))
24+
debugpy.wait_for_client()
2425

2526

2627
def setup_logging():

0 commit comments

Comments
 (0)