Skip to content

Commit b8c570d

Browse files
icerevalfelliott
authored andcommitted
remote debugging
1 parent 7bcf0c2 commit b8c570d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

dev-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ colorlog==2.5.0
55
flake8==3.0.4
66
ipdb
77
mccabe
8+
pydevd==0.0.6
89
pyflakes
910
pytest==2.8.2
1011
pytest-cov==2.2.0

tasks.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,12 @@ def test(verbose=False):
5959
@task
6060
def server():
6161
monkey_patch()
62+
63+
if os.environ.get('REMOTE_DEBUG', None):
64+
import pydevd
65+
# e.g. '127.0.0.1:5678'
66+
remote_parts = os.environ.get('REMOTE_DEBUG').split(':')
67+
pydevd.settrace(remote_parts[0], port=int(remote_parts[1]), suspend=False, stdoutToServer=True, stderrToServer=True)
68+
6269
from mfr.server.app import serve
6370
serve()

0 commit comments

Comments
 (0)