Demo of python attach
This commit is contained in:
parent
6e460bd91f
commit
6ad172aef7
4 changed files with 30 additions and 0 deletions
1
support/test/python/simple_python/.gitignore
vendored
Normal file
1
support/test/python/simple_python/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
env/
|
||||
|
|
@ -10,6 +10,15 @@
|
|||
"stopOnEntry": true,
|
||||
"console": "integratedTerminal"
|
||||
}
|
||||
},
|
||||
"attach": {
|
||||
"adapter": "vscode-python",
|
||||
"configuration": {
|
||||
"request": "attach",
|
||||
"type": "python",
|
||||
"host": "localhost",
|
||||
"port": "5678"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
1
support/test/python/simple_python/requirements.txt
Normal file
1
support/test/python/simple_python/requirements.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
ptvsd==4.3.2
|
||||
19
support/test/python/simple_python/run_with_ptvsd
Executable file
19
support/test/python/simple_python/run_with_ptvsd
Executable 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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue