Skip to content

fix bug with extension overriding debugpy endpoint #620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bundled/scripts/noConfigScripts/debugpy
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#! /bin/bash
# Bash script
export DEBUGPY_ADAPTER_ENDPOINTS=$VSCODE_DEBUGPY_ADAPTER_ENDPOINTS
python3 $BUNDLED_DEBUGPY_PATH --listen 0 --wait-for-client $@
1 change: 1 addition & 0 deletions bundled/scripts/noConfigScripts/debugpy.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@echo off
:: Bat script
set DEBUGPY_ADAPTER_ENDPOINTS=%VSCODE_DEBUGPY_ADAPTER_ENDPOINTS%
python %BUNDLED_DEBUGPY_PATH% --listen 0 --wait-for-client %*
1 change: 1 addition & 0 deletions bundled/scripts/noConfigScripts/debugpy.fish
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Fish script
set -x DEBUGPY_ADAPTER_ENDPOINTS $VSCODE_DEBUGPY_ADAPTER_ENDPOINTS
python3 $BUNDLED_DEBUGPY_PATH --listen 0 --wait-for-client $argv
1 change: 1 addition & 0 deletions bundled/scripts/noConfigScripts/debugpy.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# PowerShell script
$env:DEBUGPY_ADAPTER_ENDPOINTS = $env:VSCODE_DEBUGPY_ADAPTER_ENDPOINTS
$os = [System.Environment]::OSVersion.Platform
if ($os -eq [System.PlatformID]::Win32NT) {
python $env:BUNDLED_DEBUGPY_PATH --listen 0 --wait-for-client $args
Expand Down
4 changes: 2 additions & 2 deletions src/extension/noConfigDebugInit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ export async function registerNoConfigDebug(
// Add env var for PYDEVD_DISABLE_FILE_VALIDATION to disable extra output in terminal when starting the debug session.
collection.replace('PYDEVD_DISABLE_FILE_VALIDATION', '1');

// Add env vars for DEBUGPY_ADAPTER_ENDPOINTS, BUNDLED_DEBUGPY_PATH, and PATH
collection.replace('DEBUGPY_ADAPTER_ENDPOINTS', tempFilePath);
// Add env vars for VSCODE_DEBUGPY_ADAPTER_ENDPOINTS, BUNDLED_DEBUGPY_PATH, and PATH
collection.replace('VSCODE_DEBUGPY_ADAPTER_ENDPOINTS', tempFilePath);

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