Feature: Support `filename:function` syntax for pdb break and clear command
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Feature or enhancement
Proposal:
Currently, pdb's break command supports filename:lineno or just function (in the current context or imported modules). However, it does not support the filename:function syntax.
Attempting to use break filename:function usually results in a Error because pdb expects the part after the colon to be a line number.
main.py:
def foo():
pass
bash-5.3# ./python -m pdb main.py
> /workspaces/cpython/main.py(1)<module>()
-> def foo():
(Pdb) b main:foo
*** Bad lineno: foo
This syntax is useful for specifying a function in a specific file, especially to disambiguate if multiple files have the same function name, or if the file hasn't been loaded yet but the user wants to be explicit.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
- gh-142470
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
pdb の既存の break および clear コマンド処理から始め、filename:lineno と function の解決経路を比較します。b main:foo を使って main.py の例を再現し、そのうえで既存の形式を後退させることなく filename:function が動作することを確認します。この issue では、リンクされた PR gh-142470 が参照されています。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- cli
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 25/100