Enable remote debugging with ptvsd (#3419)

* open port 3000 for remote debugging

* add ptvsd

* use port 5678 to avoid changes in VSCode's default config

* attach to ptvsd

* no need to wait for attach

* actually, --debugger seems to be working

* create a new docker entry point for remote debugging

* alternative method to switch to debugging
This commit is contained in:
Omer Lachish
2019-02-12 09:10:18 +02:00
committed by GitHub
parent 2c1400d323
commit 330c5a85f1
4 changed files with 14 additions and 0 deletions

View File

@@ -39,6 +39,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 "create_db -- create database tables"
echo "manage -- CLI to manage redash"
echo "tests -- run tests"
@@ -72,6 +73,11 @@ case "$1" in
export FLASK_DEBUG=1
exec /app/manage.py runserver --debugger --reload -h 0.0.0.0
;;
debug)
export FLASK_DEBUG=1
export REMOTE_DEBUG=1
exec /app/manage.py runserver --debugger --no-reload -h 0.0.0.0
;;
shell)
exec /app/manage.py shell
;;