Demo of python attach

This commit is contained in:
Ben Jackson 2019-10-18 21:33:47 +01:00
commit 6ad172aef7
4 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1 @@
env/

View file

@ -10,6 +10,15 @@
"stopOnEntry": true,
"console": "integratedTerminal"
}
},
"attach": {
"adapter": "vscode-python",
"configuration": {
"request": "attach",
"type": "python",
"host": "localhost",
"port": "5678"
}
}
}
}

View file

@ -0,0 +1 @@
ptvsd==4.3.2

View file

@ -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