PowerShell / PowerShell/PowerShellEditorServices
Support Set-PSBreakpoint showing breakpoints in the editor
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C#
- Estrellas
- 767
- Forks
- 266
- Merge medio
- 3 d 16 h
- PR fusionados (30 d)
- 1
Descripción
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.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza leyendo EditorObject.cs y el enfoque de proxy de Set-PSBreakpoint descrito en la issue. Sigue cómo se accede a JsonRpcServer o ILanguageServer y, después, revisa BreakpointEvent en la especificación de DAP y el tipo de protocolo referenciado. Se considera terminado cuando añadir un breakpoint mediante Set-PSBreakpoint notifica al editor con la información del breakpoint y cuenta con manejo de errores.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp, powershell
- Área
- devtools
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 38/100