Reported slowness due in variable expansion
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 32/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- python
- 領域
- devtools, performance
調査の方向性
この issue では、ファイル、テスト、再現可能なケースのいずれも示されていません。まず、非常に大きな値に対して debugpy が変数の表示と展開をどのように処理しているかを追跡し、次に、その動作をここで説明されている DAP の lazy および indexedVariables メカニズムと比較します。大きな変数によってデバッガーとの対話がブロックされたり、クライアントが圧倒されたりしなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Isidor pointed out a tweet that mentions
S Code’s debugger would lock up whenever I stepped past a line like: S=tensor.untyped_storage()... the debugger window that automatically displays local variables started a dump of over a billion elements from the debug server before it would process any other commands.
I have not attempted to repro myself, but there are a few ways in the debug protocol that cases like this can be handled:
- Set
lazy: trueon theVariablePresentationHints of potentially expensive variables so that they aren't expanded without user action - Use
indexedVariablesto allow the client to request a small number of a variable's contained data and page through it
Even if it's unavoidable that a giant variable's data is loaded into the debug adapter, it should use these mechanisms to avoid overloading clients and slowing down interaction on the protocol.
Let me know if there's anything I can help with from the VS Code side :)
- 主要言語
- Python
- スター
- 2.5k
- フォーク
- 202
- 平均マージ
- 5日 1時間
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/debugpy のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
microsoft/debugpy の issue をすべて見る
似ている issue
-
area: harness bug status: needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Human-Agent-Society/reef#625 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
learningequality/kolibri#15351 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Name consistency オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
eellak/triplestore#65 · コメント 1 件 ·