Skip to content

Commit 8201ced

Browse files
authored
fix bug with extension overriding debugpy endpoint (#620)
* fix bug with extension overriding debugpy endpoint * update for all shell types
1 parent 4d27e65 commit 8201ced

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#! /bin/bash
22
# Bash script
3+
export DEBUGPY_ADAPTER_ENDPOINTS=$VSCODE_DEBUGPY_ADAPTER_ENDPOINTS
34
python3 $BUNDLED_DEBUGPY_PATH --listen 0 --wait-for-client $@
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
@echo off
22
:: Bat script
3+
set DEBUGPY_ADAPTER_ENDPOINTS=%VSCODE_DEBUGPY_ADAPTER_ENDPOINTS%
34
python %BUNDLED_DEBUGPY_PATH% --listen 0 --wait-for-client %*
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Fish script
2+
set -x DEBUGPY_ADAPTER_ENDPOINTS $VSCODE_DEBUGPY_ADAPTER_ENDPOINTS
23
python3 $BUNDLED_DEBUGPY_PATH --listen 0 --wait-for-client $argv

bundled/scripts/noConfigScripts/debugpy.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# PowerShell script
2+
$env:DEBUGPY_ADAPTER_ENDPOINTS = $env:VSCODE_DEBUGPY_ADAPTER_ENDPOINTS
23
$os = [System.Environment]::OSVersion.Platform
34
if ($os -eq [System.PlatformID]::Win32NT) {
45
python $env:BUNDLED_DEBUGPY_PATH --listen 0 --wait-for-client $args

src/extension/noConfigDebugInit.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ export async function registerNoConfigDebug(
6767
// Add env var for PYDEVD_DISABLE_FILE_VALIDATION to disable extra output in terminal when starting the debug session.
6868
collection.replace('PYDEVD_DISABLE_FILE_VALIDATION', '1');
6969

70-
// Add env vars for DEBUGPY_ADAPTER_ENDPOINTS, BUNDLED_DEBUGPY_PATH, and PATH
71-
collection.replace('DEBUGPY_ADAPTER_ENDPOINTS', tempFilePath);
70+
// Add env vars for VSCODE_DEBUGPY_ADAPTER_ENDPOINTS, BUNDLED_DEBUGPY_PATH, and PATH
71+
collection.replace('VSCODE_DEBUGPY_ADAPTER_ENDPOINTS', tempFilePath);
7272

7373
const noConfigScriptsDir = path.join(extPath, 'bundled', 'scripts', 'noConfigScripts');
7474
const pathSeparator = process.platform === 'win32' ? ';' : ':';

0 commit comments

Comments
 (0)