PowerShell / PowerShell/PowerShellEditorServices
Support Set-PSBreakpoint showing breakpoints in the editor
Nessuno ha ancora preso questa issue.
- Lingua principale
- C#
- Stelle
- 767
- Fork
- 266
- Merge medio
- 3g 16h
- PR unite (30g)
- 1
Descrizione
By creating a Proxy function of Set-PSBreakpoint, we can fire the breakpoint event as seen in the DAP spec to notify the client that a breakpoint has been added.
This is the really the final feature needed to provide the "console debugging in PSES experience" that feels totally integrated.
Creating a Proxy cmdlet is easy with:
$Metadata = [System.Management.Automation.CommandMetaData]::new((Get-Command Set-PSBreakpoint))
[System.Management.Automation.ProxyCommand]::Create($Metadata)
Then we'll need a way to give the EditorObject the state of the debugger... but mainly the JsonRpcServer object so that we can use it to send the SendNotification( method to send the breakpoint information to the client.
Then we take that proxy function and add something like:
$psEditor.Components
.GetService([OmniSharp.Extensions.LanguageServer.Protocol.Server.ILanguageServer])
.SendNotification("breakpoint", [OmniSharp.Extensions.DebugAdapter.Protocol.Events.BreakpointEvent]::new(<#...#>))
with some error handling and we should be good to go.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia leggendo EditorObject.cs e l’approccio proxy di Set-PSBreakpoint descritto nell’issue. Traccia come viene effettuato l’accesso a JsonRpcServer o ILanguageServer, quindi esamina BreakpointEvent nella specifica DAP e il tipo di protocollo indicato. Il lavoro è completato quando l’aggiunta di un breakpoint tramite Set-PSBreakpoint notifica l’editor con le informazioni sul breakpoint, con gestione degli errori.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp, powershell
- Ambito
- devtools
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100