Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Reported slowness due in variable expansion

オープン
#1,660 コメント 2 件 リアクション 3 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
32/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python

調査の方向性

この issue では、ファイル、テスト、再現可能なケースのいずれも示されていません。まず、非常に大きな値に対して debugpy が変数の表示と展開をどのように処理しているかを追跡し、次に、その動作をここで説明されている DAP の lazy および indexedVariables メカニズムと比較します。大きな変数によってデバッガーとの対話がブロックされたり、クライアントが圧倒されたりしなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug needs repro

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: true on the VariablePresentationHints of potentially expensive variables so that they aren't expanded without user action
  • Use indexedVariables to 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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/debugpy のほかの issue

microsoft/debugpy の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。