feat:Add getAllProcesses API for retrieving all system processes #84
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add getAllProcesses API for retrieving all system processes
📝 Description
This PR introduces a new
getAllProcesses()API to retrieve a comprehensive list of all processes currently running on the Windows system, complementing the existing process-related APIs.✨ Changes
Core Implementation
getAllProcesses()Files Changed
lib/index.ts - Core implementation with promisify support
getAllProcesses()function__promisify__()for Promise supportpromisify.customsymbollib/promises.ts - Promise wrapper
lib/test.ts - Comprehensive test suite
typings/windows-process-tree.d.ts - Type definitions
typings/windows-process-tree/promises.d.ts - Promise type definitions
🎯 Motivation
Background
WMIC is deprecated in Windows 10 (21H1+) and Windows Server 2022+, breaking the Python debugger's attach-to-process functionality.
Solution Strategy
The Python debugger is transitioning from shelling out to external tools (PowerShell/WMIC) to using the native
vscode-windows-process-treepackage for:Why
getAllProcesses()?The existing
getProcessList(rootPid)requires a root PID parameter. For the Python debugger's process picker, we need to enumerate all processes without PID filtering. This new API fills that gap.🔗 Related Issues
🧪 Testing
All tests passing ✅
©Copyright
// This PR description was compiled by AI
// No programmers were harmed in the making of this description