PowerShell / PowerShell/PowerShellEditorServices
Support Set-PSBreakpoint showing breakpoints in the editor
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 767
- フォーク
- 266
- 平均マージ
- 3日 16時間
- マージ済み PR(30日)
- 1
説明
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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず EditorObject.cs と、issue で説明されている Set-PSBreakpoint のプロキシアプローチを読みます。JsonRpcServer または ILanguageServer にアクセスする方法を追跡し、その後 DAP 仕様の BreakpointEvent と、参照されているプロトコル型を確認します。Set-PSBreakpoint を使用してブレークポイントを追加すると、ブレークポイント情報とともにエディターに通知され、エラー処理も行われるようになれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp, powershell
- 領域
- devtools
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100