`break /foo/` for matched method
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Ruby
- Star
- 1.3k
- Fork
- 146
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ruby/debug
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
-
Support exceptionOptions in setExceptionBreakpoints to catch arbitrary exception classes via DAP Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100