`break /foo/` for matched method
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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 containsfoo.C1#foo,C2#foobar,C3#bazfoo, ...
break C#/foo/: C's methods which containsfoo.C#foo,C#foobar, ...- Seem's ugly...
break /C/#foo: Method foo of classes which names containC.C1#fooC2#foo, ...- Seems ugly too.
- Only allow
break /C#foo/orbreak /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 allinitializemethods (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#fooD.fooE.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.
- Dominant language
- Ruby
- Stars
- 1.3k
- Forks
- 146
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ruby/debug
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Support exceptionOptions in setExceptionBreakpoints to catch arbitrary exception classes via DAP Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
バグ
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
voxpupuli/puppet-epel#186 · 1 comment ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) OpenBug Frontend
Difficulty 2/5 1-3 hours Newbie friendliness 78/100