`break /foo/` for matched method

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

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

評価

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

調査の方向性

No files, tests, or implementation entry points are named. Start by tracing how the debugger parses and installs the existing break command, then determine how pending breakpoints and future method definitions are handled. Done means an agreed regexp notation and behavior for matching method names, including tests for existing and future definitions.

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

説明

enhancement

gdb has rbreak regexp (https://sourceware.org/gdb/onlinedocs/gdb/Set-Breaks.html) and maybe debug.gem can provide similar feature.

related to: https://github.com/ruby/debug/issues/655

Questions:

  • Notation:
    • break /foo/ all methods which names contains foo.
      • C1#foo, C2#foobar, C3#bazfoo, ...
    • break C#/foo/: C's methods which contains foo.
      • C#foo, C#foobar, ...
      • Seem's ugly...
    • break /C/#foo: Method foo of classes which names contain C.
      • C1#foo C2#foo, ...
      • Seems ugly too.
    • Only allow break /C#foo/ or break /C\.foo/ and so on?
    • Only allow to match method name?
      • It seems simple. We can extend it later.
  • Behavior:
    • Set breakpoints for existing matched methods (no problem)
    • Set breakpoints for future defined matched methods?
      • break /initialize/ means all initialize methods (and defined in future) can be trapped.
      • maybe it is convenient to support it.
    • Can we support break /obj.foo/ style?
      • maybe no if we allow future defined methods.

So current idea is:

  • break /regexp/ set method breakpoints where the method name matched with Class/Module/method name.
    • break /foo/ should be matched with:
      • C#foo
      • D.foo
      • E.bazfooboo
      • We can not match on class/module names (at least now).
  • It leaves as a pending breakpoint and set breakpoint in future definitions. User needs to del it if you don't need more.
主要言語
Ruby
スター
1.3k
フォーク
146
PR マージ指標
30日以内にマージされた PR はありません

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

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

はじめの一歩

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

ruby/debug のほかの issue

ruby/debug の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

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

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