microsoft / microsoft/vscode-python-debugger

Feature Request: Conditional Breakpoints

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

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

triage-needed
主要言語
TypeScript
スター
180
フォーク
126
平均マージ
2日 3時間
マージ済み PR(30日)
3

説明

Motivation

For efficient debugging, I very often need to have a break-point trigger only under certain circumstances.

Consider the following setup

Image

here I may for example only wish for the break point to trigger if

"advanced" in case.tags

holds.

Current workaround

Currently, I can achieve this, but only by rewriting the code as a workaround:

Image

Proposal

The workaround is clearly clumsy, esp. as it means injecting code into ones codebase, which is en par with adding print statements everywhere.

What would be much more ideal would be one could simply add dynamic trigger-conditions to the break points.[^trigger]

For example in the UI would could add a right-click menu to the individual break points > add conditions > user entry of boolean expression:

Image

Here one could consider the cases

checkbox trigger condition behaviour
* never triggers
(empty) always triggers
cannot be evaluated never triggers
can be evaluated and evaluates to true triggers in the given instance
can be evaluated and evaluates to false does not trigger in the given instance

[^trigger]: currently they can only statically be toggled.

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

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

はじめの一歩

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

調査の方向性

issue では、ファイル、テスト、エントリーポイントのいずれも指定されていません。まず、Python デバッガーでブレークポイントの状態と評価がどのように処理されているかを追跡します。done では、空、無効、true、false の条件について、列挙された UI と動作のケースをカバーする必要があります。

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

評価

技術スタック
python, typescript, vscode
領域
devtools
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

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

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