Don't copy the environment to update it
This causes problems on windows, and is wasteful anyway. The subprocess will pick up the environment from its parent.
This commit is contained in:
parent
573121ee08
commit
8261cde3c9
5 changed files with 38 additions and 14 deletions
|
|
@ -1,8 +1,12 @@
|
|||
{
|
||||
"$schema": "https://puremourning.github.io/vimspector/schema/vimspector.schema.json",
|
||||
"adapters": {
|
||||
"test_custom": {
|
||||
"command": "This is a test"
|
||||
"run_with_debugpy": {
|
||||
"command": [ "${workspaceRoot}/run_with_debugpy" ],
|
||||
"port": 9876,
|
||||
"env": {
|
||||
"DEBUG_PORT": "9876"
|
||||
}
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
|
|
@ -44,6 +48,19 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"attach-run": {
|
||||
"adapter": "run_with_debugpy",
|
||||
"configuration": {
|
||||
"request": "attach"
|
||||
},
|
||||
"breakpoints": {
|
||||
"exception": {
|
||||
"raised": "N",
|
||||
"uncaught": "",
|
||||
"userUnhandled": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"run": {
|
||||
"adapter": "debugpy",
|
||||
"configuration": {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
PYTHON=python3
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
PYTHON=$1
|
||||
if [ -z "$DEBUG_PORT" ]; then
|
||||
DEBUG_PORT=5678
|
||||
fi
|
||||
|
||||
pushd $(dirname $0)
|
||||
|
|
@ -11,10 +9,11 @@ pushd $(dirname $0)
|
|||
rm -rf env
|
||||
fi
|
||||
|
||||
$PYTHON -m venv env
|
||||
python3 -m venv env
|
||||
. env/bin/activate
|
||||
python -m pip install -r requirements.txt
|
||||
echo "using port $DEBUG_PORT"
|
||||
echo "*** Launching ***"
|
||||
python -m debugpy --wait-for-client --listen 0.0.0.0:5678 main.py
|
||||
python -m debugpy --wait-for-client --listen 0.0.0.0:${DEBUG_PORT} main.py
|
||||
popd
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue