PowerShell / PowerShell/vscode-powershell

Ability to quickly find runspaces that are awaiting for a debugger when attaching to a PowerShell Host Process

Aperta
#5,598 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Issue-Enhancement Needs: Triage
Lingua principale
TypeScript
Stelle
1.9k
Fork
548
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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:

Image

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo il flusso di attach-to-process di VS Code con un host PowerShell contenente più runspaces, quindi confronta l’elenco dei runspaces con Get-Runspace | Where-Object {$_.Debugger.InBreakpoint}. Aggiorna l’etichetta del runspace in modo che identifichi le voci in attesa del debugger e verifica che il processo collegato renda facile selezionare il runspace corretto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
powershell, typescript, vscode
Ambito
developer-experience, devtools
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
68/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.