Skip to content

Commit

Permalink
Demo of python attach
Browse files Browse the repository at this point in the history
  • Loading branch information
puremourning committed Oct 26, 2019
1 parent 6e460bd commit 6ad172a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions support/test/python/simple_python/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
env/
9 changes: 9 additions & 0 deletions support/test/python/simple_python/.vimspector.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
"stopOnEntry": true,
"console": "integratedTerminal"
}
},
"attach": {
"adapter": "vscode-python",
"configuration": {
"request": "attach",
"type": "python",
"host": "localhost",
"port": "5678"
}
}
}
}
1 change: 1 addition & 0 deletions support/test/python/simple_python/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ptvsd==4.3.2
19 changes: 19 additions & 0 deletions support/test/python/simple_python/run_with_ptvsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

PYTHON=python3

if [ -n "$1" ]; then
PYTHON=$1
fi

pushd $(dirname $0)
if [ ! -d env ]; then
virtualenv -p $PYTHON env
fi

. env/bin/activate
pip install -r requirements.txt

python -m ptvsd --wait --host localhost --port 5678 main.py
popd

0 comments on commit 6ad172a

Please sign in to comment.