Pending MethodBreakpoint
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
Rechercherichtung
Reproduce the b o.s and b not_lvar.foo examples in target.rb using exe/rdbg, then read the breakpoint handling behind the break command. Done means the behavior clearly distinguishes current-context expressions from singleton-method expressions and defines when an invalid expression may remain pending.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
When we set a method breakpoint with break C.foo and If the C or C.foo is not defined, it will be a pending breakpoint and when C.foo is activated, it will be activated.
We can set breakpoint with any expression like:
[1, 7] in target.rb
1|
2| def (o = '').s
3| :s
4| end
5|
=> 6| p o.s
7| __END__
=>#0 <main> at target.rb:6
(rdbg:commands) b o.s
#0 BP - Method o.s at target.rb:2
(rdbg) c
[1, 7] in target.rb
1|
2| def (o = '').s
=> 3| :s
4| end
5|
6| p o.s
7| __END__
=>#0 .s at target.rb:3
#1 <main> at target.rb:6
Stop by #0 BP - Method o.s at target.rb:2
In this case, user can set a breakpoint with current context (lvar o).
The problem is, if we write an expression which does not valid, the breakpoint will be registered as a pending breakpoint.
(rdbg) b not_lvar.foo
undefined local variable or method `not_lvar' for "":String
#1 BP - Method (pending) not_lvar.foo
Maybe it will not be activated in future.
This is useful for singleton method:
[master]$ exe/rdbg target.rb -e 'b C.foo'
DEBUGGER: Session start (pid: 19219)
[1, 7] in target.rb
1|
=> 2| class C
3| def self.foo
4| end
5| end
6|
7| __END__
=>#0 <main> at target.rb:2
(rdbg:commands) b C.foo
uninitialized constant C
#0 BP - Method (pending) C.foo
(rdbg) c
DEBUGGER: BP - Method C.foo at target.rb:3 is activated.
At first, C is not defined so it will be a pending breakpoint. After that C.foo is defined and the breakpoint will be activated.
b expr.method has two usecases:
- (1) want to set breakpoint to the current context
- (2) want to set singleton class
For (1), it should not make a pending breakpoint.
For (2),, it should.
We can not recognize the purpose for (1) and (2) now.
Ideas:
- If the expression is like
Constant, allow to make pending.- It saves (2).
- Not complete for (1)
- Add option to recognize 1 and 2.
break --allow-pending C.foofor (2).- Too long...
- Vorherrschende Sprache
- Ruby
- Sterne
- 1.3k
- Forks
- 146
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus ruby/debug
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
-
Support exceptionOptions in setExceptionBreakpoints to catch arbitrary exception classes via DAP Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
バグ
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
voxpupuli/puppet-epel#186 · 1 Kommentar ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) OffenBug Frontend
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100