Skip to content

Commit

Permalink
Add debug script for use with ptvsd
Browse files Browse the repository at this point in the history
  • Loading branch information
lewfish committed Aug 30, 2019
1 parent 73e885d commit 162dcbd
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions scripts/debug
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

set -e

if [[ -n "${RASTER_VISION_DEBUG}" ]]; then
set -x
fi

function usage() {
echo -n \
"Usage: $(basename "$0") <python module + args>
Run a Python module using VS code debugger.
Example:
./scripts/debug rastervision run inprocess -e examples.potsdam
"
}

python -m ptvsd --host 0.0.0.0 --port 3000 --wait -m ${@:1}

0 comments on commit 162dcbd

Please sign in to comment.