Skip to content

Commit efd9277

Browse files
authored
Merge branch 'main' into rchiodo-add-pyrefly-exclude-setting
2 parents 90a13ca + 698d6d4 commit efd9277

18 files changed

Lines changed: 581 additions & 919 deletions

File tree

.github/actions/build-vsix/action.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ runs:
1515
node-version: ${{ inputs.node_version }}
1616
cache: 'npm'
1717

18-
# Minimum supported version is Python 3.9
19-
- name: Use Python 3.9
18+
# Minimum supported version is Python 3.10 (debugpy no longer supports Python 3.9,
19+
# and pip 26.1+ requires Python >= 3.10)
20+
- name: Use Python 3.10
2021
uses: actions/setup-python@v5
2122
with:
22-
python-version: 3.9
23+
python-version: '3.10'
2324

2425
- name: Pip cache
2526
uses: actions/cache@v4

.github/actions/lint/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ runs:
3030
- name: Install Python
3131
uses: actions/setup-python@v5
3232
with:
33-
python-version: '3.9'
33+
python-version: '3.10'
3434

3535
- name: Pip cache
3636
uses: actions/cache@v4

.github/workflows/pr-check.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ jobs:
5050
strategy:
5151
fail-fast: false
5252
matrix:
53-
os: [ubuntu-latest, windows-latest]
54-
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
53+
os: [ubuntu-latest, windows-2022]
54+
python: ['3.10', '3.11', '3.12', '3.13']
5555

5656
steps:
5757
- name: Checkout
@@ -60,11 +60,12 @@ jobs:
6060
path: ${{ env.special-working-directory-relative }}
6161
persist-credentials: false
6262

63-
# Install bundled libs using 3.9 even though you test it on other versions.
64-
- name: Use Python 3.9
63+
# Install bundled libs using 3.10 (minimum supported; debugpy dropped 3.9 support,
64+
# and pip 26.1+ requires Python >= 3.10).
65+
- name: Use Python 3.10
6566
uses: actions/setup-python@v5
6667
with:
67-
python-version: '3.9'
68+
python-version: '3.10'
6869

6970
- name: Update pip, install pipx and install wheel
7071
run: python -m pip install -U pip pipx wheel

.github/workflows/push-check.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ jobs:
5555
strategy:
5656
fail-fast: false
5757
matrix:
58-
os: [ubuntu-latest, windows-latest]
59-
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
58+
os: [ubuntu-latest, windows-2022]
59+
python: ['3.10', '3.11', '3.12', '3.13']
6060

6161
steps:
6262
- name: Checkout
@@ -65,11 +65,12 @@ jobs:
6565
path: ${{ env.special-working-directory-relative }}
6666
persist-credentials: false
6767

68-
# Install bundled libs using 3.9 even though you test it on other versions.
69-
- name: Use Python 3.9
68+
# Install bundled libs using 3.10 (minimum supported; debugpy dropped 3.9 support,
69+
# and pip 26.1+ requires Python >= 3.10).
70+
- name: Use Python 3.10
7071
uses: actions/setup-python@v5
7172
with:
72-
python-version: '3.9'
73+
python-version: '3.10'
7374

7475
- name: Update pip, install pipx and install wheel
7576
run: python -m pip install -U pip pipx wheel
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/bash
1+
#! /usr/bin/env bash
22
# Bash script
33
export DEBUGPY_ADAPTER_ENDPOINTS=$VSCODE_DEBUGPY_ADAPTER_ENDPOINTS
44
python3 $BUNDLED_DEBUGPY_PATH --listen 0 --wait-for-client $@

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
# Single source of truth for the debugpy version we bundle.
2727
# Update this when bumping debugpy (and update bundled/libs/debugpy accordingly).
28-
DEBUGPY_VERSION = "1.8.20"
28+
DEBUGPY_VERSION = "1.8.21"
2929

3030

3131
def _build_debugpy_wheel_requests(vsce_target: str, version: str) -> list[dict]:

package-lock.json

Lines changed: 349 additions & 890 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "debugpy",
33
"displayName": "Python Debugger",
44
"description": "Python Debugger extension using debugpy.",
5-
"version": "2026.5.0-dev",
5+
"version": "2026.7.0-dev",
66
"publisher": "ms-python",
77
"enabledApiProposals": [
88
"portsAttributes",
@@ -747,7 +747,7 @@
747747
"dependencies": {
748748
"@vscode/debugadapter": "^1.65.0",
749749
"@vscode/debugprotocol": "^1.65.0",
750-
"@vscode/extension-telemetry": "^0.8.4",
750+
"@vscode/extension-telemetry": "^1.5.2",
751751
"@vscode/python-extension": "^1.0.6",
752752
"@vscode/windows-process-tree": "^0.7.0",
753753
"fs-extra": "^11.2.0",

src/extension/debugger/attachQuickPick/provider.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
'use strict';
55

6-
import { l10n } from 'vscode';
6+
import * as path from 'path';
7+
import { env, l10n } from 'vscode';
78
import type { IProcessInfo } from '@vscode/windows-process-tree';
89
import { getOSType, OSType } from '../../common/platform';
910
import { PsProcessParser } from './psProcessParser';
@@ -16,6 +17,14 @@ import { logProcess } from '../../common/process/logger';
1617
export class AttachProcessProvider implements IAttachProcessProvider {
1718
constructor() {}
1819

20+
public _loadWindowsProcessTree(): typeof import('@vscode/windows-process-tree') {
21+
const wpcPath = path.join(env.appRoot, 'node_modules', '@vscode', 'windows-process-tree');
22+
// Use eval to bypass webpack's require interception for loading native addon at runtime
23+
// eslint-disable-next-line no-eval
24+
const nodeRequire = eval('require') as NodeJS.Require;
25+
return nodeRequire(wpcPath);
26+
}
27+
1928
public getAttachItems(): Promise<IAttachItem[]> {
2029
return this._getInternalProcessEntries().then((processEntries) => {
2130
processEntries.sort(
@@ -63,7 +72,7 @@ export class AttachProcessProvider implements IAttachProcessProvider {
6372

6473
if (osType === OSType.Windows) {
6574
try {
66-
const wpc = require('@vscode/windows-process-tree');
75+
const wpc = this._loadWindowsProcessTree();
6776
const processList = await new Promise<IProcessInfo[]>((resolve) => {
6877
wpc.getAllProcesses(
6978
(processes: IProcessInfo[]) => resolve(processes),

src/extension/debugger/hooks/childProcessAttachService.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,18 @@ import { traceLog } from '../../common/log/logging';
2222
export class ChildProcessAttachService implements IChildProcessAttachService {
2323
@captureTelemetry(EventName.DEBUGGER_ATTACH_TO_CHILD_PROCESS)
2424
public async attach(data: AttachRequestArguments & DebugConfiguration, parentSession: DebugSession): Promise<void> {
25-
const debugConfig: AttachRequestArguments & DebugConfiguration = data;
25+
const debugConfig: AttachRequestArguments & DebugConfiguration = { ...data };
26+
27+
// Remove the 'purpose' field from the child process debug configuration.
28+
// The child session inherits the parent's configuration (including 'purpose')
29+
// via debugpy's notify_of_subprocess. If the parent is a test debug session
30+
// (purpose: ['debug-test']), the child would also appear to be a test session.
31+
// This can cause the Python extension's test adapter to incorrectly treat the
32+
// child process session termination as the end of the test run, which results
33+
// in premature disconnection of the parent (test runner) debug session.
34+
// See: https://github.com/microsoft/vscode-python-debugger/issues/981
35+
delete debugConfig.purpose;
36+
2637
const debugSessionOption: DebugSessionOptions = {
2738
parentSession: parentSession,
2839
lifecycleManagedByParent: true,

0 commit comments

Comments
 (0)