diff --git a/support/test/python/simple_python/.gitignore b/support/test/python/simple_python/.gitignore new file mode 100644 index 000000000..bdaab25d5 --- /dev/null +++ b/support/test/python/simple_python/.gitignore @@ -0,0 +1 @@ +env/ diff --git a/support/test/python/simple_python/.vimspector.json b/support/test/python/simple_python/.vimspector.json index 13e996ce1..600295cdb 100644 --- a/support/test/python/simple_python/.vimspector.json +++ b/support/test/python/simple_python/.vimspector.json @@ -10,6 +10,15 @@ "stopOnEntry": true, "console": "integratedTerminal" } + }, + "attach": { + "adapter": "vscode-python", + "configuration": { + "request": "attach", + "type": "python", + "host": "localhost", + "port": "5678" + } } } } diff --git a/support/test/python/simple_python/requirements.txt b/support/test/python/simple_python/requirements.txt new file mode 100644 index 000000000..dffcdab82 --- /dev/null +++ b/support/test/python/simple_python/requirements.txt @@ -0,0 +1 @@ +ptvsd==4.3.2 diff --git a/support/test/python/simple_python/run_with_ptvsd b/support/test/python/simple_python/run_with_ptvsd new file mode 100755 index 000000000..6b8c401c2 --- /dev/null +++ b/support/test/python/simple_python/run_with_ptvsd @@ -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 +