Support "multi-session" mode properly
Document remote debugging and add a test
This commit is contained in:
parent
36253e58ce
commit
c6d6c7f876
12 changed files with 417 additions and 36 deletions
|
|
@ -2,7 +2,7 @@
|
|||
"configurations": {
|
||||
// This is a comment.
|
||||
"run legacy vscode-python": {
|
||||
"adapter": "vscode-python" /* coment goes here too */,
|
||||
"adapter": "vscode-python", /* coment goes here too */
|
||||
"configuration": {
|
||||
"request": "launch",
|
||||
"type": "python",
|
||||
|
|
@ -19,12 +19,9 @@
|
|||
}
|
||||
},
|
||||
"attach": {
|
||||
"adapter": "debugpy",
|
||||
"adapter": "multi-session",
|
||||
"configuration": {
|
||||
"request": "attach",
|
||||
"type": "python",
|
||||
"host": "localhost",
|
||||
"port": "5678"
|
||||
"request": "attach"
|
||||
},
|
||||
"breakpoints": {
|
||||
"exception": {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
ptvsd==4.3.2
|
||||
debugpy
|
||||
|
|
|
|||
20
support/test/python/simple_python/run_with_debugpy
Executable file
20
support/test/python/simple_python/run_with_debugpy
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
PYTHON=python3
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
PYTHON=$1
|
||||
fi
|
||||
|
||||
pushd $(dirname $0)
|
||||
if [ -d env ]; then
|
||||
rm -rf env
|
||||
fi
|
||||
|
||||
$PYTHON -m venv env
|
||||
. env/bin/activate
|
||||
python -m pip install -r requirements.txt
|
||||
echo "*** Launching ***"
|
||||
python -m debugpy --wait-for-client --listen 0.0.0.0:5678 main.py
|
||||
popd
|
||||
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
#!/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