Attach process picker still hangs without WMIC because windows-process-tree loader misses node_modules.asar
Maintainer antworten meist innerhalb von 5 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 58/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- node.js, typescript
- Bereich
- devtools
Rechercherichtung
Beginnen Sie mit dem process-picker loader, der den @vscode/windows-process-tree-Pfad erstellt, und verfolgen Sie, wie dessen weit gefasster catch WMIC auswählt. Reproduzieren Sie das paketierte Layout mit node_modules.asar und node_modules.asar.unpacked, und überprüfen Sie anschließend, dass die Prozessenumeration ohne WMIC funktioniert und dass Ladefehler im extension host log weiterhin sichtbar bleiben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Environment
- Python Debugger:
2026.7.12401012(pre-release) - VS Code:
1.135.0(08d4889f9ec4a1685d257b9b95de036c8e1ce1e5, x64) - OS: Windows 11 Pro x64,
10.0.26200 - WMIC: not installed
Reproduction
Use the generated attach configuration:
{
"name": "Python Debugger: Attach using Process Id",
"type": "debugpy",
"request": "attach",
"processId": "${command:pickProcess}"
}
Start debugging and wait for the process picker.
Expected behavior
A Quick Pick containing the running processes is displayed.
Actual behavior
The progress indicator keeps running, but the process picker never appears. The extension host log contains:
Error: spawn wmic ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:287:19)
at onErrorNT (node:internal/child_process:508:16)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
Using a literal PID works.
Cause found locally
The current implementation added in #1030 loads the native module from this path:
const wpcPath = path.join(env.appRoot, 'node_modules', '@vscode', 'windows-process-tree');
const nodeRequire = eval('require') as NodeJS.Require;
return nodeRequire(wpcPath);
In the packaged VS Code 1.135.0 installation, @vscode/windows-process-tree is not present under the physical node_modules directory. It is packaged at:
<env.appRoot>/node_modules.asar/@vscode/windows-process-tree
with its native files under node_modules.asar.unpacked.
Loading both paths with VS Code's Electron/Node runtime produces:
<env.appRoot>/node_modules/@vscode/windows-process-tree
-> MODULE_NOT_FOUND
<env.appRoot>/node_modules.asar/@vscode/windows-process-tree
-> loads successfully
-> exports ProcessDataFlag, getAllProcesses, getProcessList, etc.
The native loader exception is swallowed by the broad catch, so the provider silently falls back to WMIC. WMIC is no longer installed by default on current Windows builds, and that second failure leaves the picker waiting indefinitely.
Suggested direction
- Resolve the packaged ASAR location as well as development/older layouts.
- Avoid falling back exclusively to deprecated WMIC; PowerShell/CIM could provide a non-native fallback.
- Log the original
windows-process-treeloading exception so this failure mode is visible.
Related: #744, #867, #899, #991, #1030.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 181
- Forks
- 126
- Ø Merge
- 14 T. 4 Std.
- Gemergte PRs (30 T.)
- 2
Entwicklungsumgebung
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/vscode-python-debugger
-
triage-needed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
microsoft/vscode-python-debugger#1110 ·
Maintainer antworten meist innerhalb von 5 Tagen
-
triage-needed
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
microsoft/vscode-python-debugger#1024 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 5 Tagen
-
Update dependencies with actionable security alertsEvtl. vergeben @copilot-swe-agent hat das vor 15 Tagen übernommen. Offentriage-needed
microsoft/vscode-python-debugger#1111 · 1 Reaktion · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 5 Tagen
-
Update vulnerable npm dependenciesEvtl. wieder frei Ein Pull Request dazu wurde ohne Merge geschlossen. Offentriage-needed
microsoft/vscode-python-debugger#1104 · 1 Reaktion · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 5 Tagen
-
triage-needed
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
microsoft/vscode-python-debugger#1052 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 5 Tagen
Alle Issues in microsoft/vscode-python-debugger
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
aiko-chan-ai/DiscordBotClient#380 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
vercel/ai-elements#507 ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 84/100
anaclumos/qa-interns#148 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag