PowerShell / PowerShell/vscode-powershell
Ability to quickly find runspaces that are awaiting for a debugger when attaching to a PowerShell Host Process
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 1.9k
- Forks
- 548
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Prerequisites
- I have written a descriptive issue title.
- I have searched all issues to ensure it has not already been reported.
Summary
I'm working on a script that depends on the PODE module (a Web Server wrapped into a PowerShell module). The recommended approach to debugging it is to add Wait-PodeDebugger cmdlet in the code (wherever you need it to start waiting), trigger the respective code block and then attach to its process, find a runspace that's awaiting for the debugger using the below code and debug it:
Get-Runspace | Where-Object {$_.Debugger.InBreakpoint}
Unfortunately, the module produces a lot of runspaces and when you try to attach to the respective process with VSCode you see a list of ~20 runspaces with their respective RunspaceAvailability values (most of which are Busy) so picking the right one becomes a guesswork. Because of that I first need to attach to the process from a terminal, find the right runspace, detach the terminal and re-attach with VSCode:
Is it possible to add the detail about whether the runspace is awaiting for the debugger to the label? That would greatly simplify the debugging workflow.
Thanks!
Proposed Design
No response
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, den Attach-to-Process-Ablauf von VS Code mit einem PowerShell-Host zu reproduzieren, der mehrere runspaces enthält, und vergleiche anschließend die runspace-Liste mit Get-Runspace | Where-Object {$_.Debugger.InBreakpoint}. Aktualisiere die runspace-Bezeichnung so, dass sie Einträge identifiziert, die auf den Debugger warten, und überprüfe, dass der angehängte Prozess die Auswahl des richtigen runspace erleichtert.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- powershell, typescript, vscode
- Bereich
- developer-experience, devtools
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 68/100