You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
attach by processId fails on windows due to removed wmic.exe #1721
With the August 2026 update wmic.exe was finally removed from Windows after being deprecated for some years. src/processTree.ts still uses wmic.exe to fetch the process list.
Attaching to a running Java process either by picking a process or by processId now fails.
An alternative is this powershell script: Get-CimInstance Win32_Process | ForEach-Object { "$($_.CommandLine) $($_.ParentProcessId) $($_.ProcessId)" }
Thanks for the clear report. The current Windows path in src/processTree.ts still launches System32\wbem\WMIC.exe to enumerate processes, so systems where WMIC has been removed cannot build the process tree used by process-picker and processId attachment. This confirms the failure is in the extension-side Windows process enumeration rather than the debug server or target JVM. We did not find an existing issue with matching technical details across the configured Java-tooling repositories. The suggested Get-CimInstance Win32_Process approach is useful input for the maintainer investigation.
Thanks for reporting this. As a workaround, please attach directly to the JVM’s debug port instead of using processId or the process picker. This avoids the dependency on WMIC.
Add this configuration to .vscode/launch.json, replacing 5005 with your JVM’s actual JDWP port:
Activity
issuelens commentedon Oct 26, 2026
Thanks for the clear report. The current Windows path in
src/processTree.tsstill launchesSystem32\wbem\WMIC.exeto enumerate processes, so systems where WMIC has been removed cannot build the process tree used by process-picker andprocessIdattachment. This confirms the failure is in the extension-side Windows process enumeration rather than the debug server or target JVM. We did not find an existing issue with matching technical details across the configured Java-tooling repositories. The suggestedGet-CimInstance Win32_Processapproach is useful input for the maintainer investigation.wmic removal microsoft#1721
wenytang-ms commentedon Oct 28, 2026
Thanks for reporting this. As a workaround, please attach directly to the JVM’s debug port instead of using
processIdor the process picker. This avoids the dependency on WMIC.Add this configuration to
.vscode/launch.json, replacing5005with your JVM’s actual JDWP port:{ "version": "0.2.0", "configurations": [ { "type": "java", "name": "Attach to Java (port 5005)", "request": "attach", "hostName": "127.0.0.1", "port": 5005 } ] }The target JVM must have JDWP enabled. Please let us know whether this works for you.