Skip to content

Conversation

@ko1
Copy link
Collaborator

@ko1 ko1 commented Jul 11, 2022

Now method breakpoints accepts expr.name and expr#name.
And with any expr can become a pending method bp.
However, general expr in other context does not make sense,
so only ClassName style expressions can become pending bps.
They can be activated when the ClassName#foo is defined.

@ko1
Copy link
Collaborator Author

ko1 commented Jul 11, 2022

memo:

$ exe/rdbg  -n  target.rb
[1, 7] in target.rb
=>   1| binding.b do: 'b x.y.foo'
     2| binding.b do: 'b Foo::Bar.foo'
     3| binding.b do: 'b ::Foo::Bar.foo'
     4| binding.b do: 'b'
     5|
     6|
     7| __END__
=>#0    <main> at target.rb:1
(rdbg:binding.break) b x.y.foo
Not a constant name: "x.y"
[1, 7] in target.rb
     1| binding.b do: 'b x.y.foo'
=>   2| binding.b do: 'b Foo::Bar.foo'
     3| binding.b do: 'b ::Foo::Bar.foo'
     4| binding.b do: 'b'
     5|
     6|
     7| __END__
=>#0    <main> at target.rb:2
(rdbg:binding.break) b Foo::Bar.foo
Unknown constant name: "Foo"
#0  BP - Method (pending)  Foo::Bar.foo
[1, 7] in target.rb
     1| binding.b do: 'b x.y.foo'
     2| binding.b do: 'b Foo::Bar.foo'
=>   3| binding.b do: 'b ::Foo::Bar.foo'
     4| binding.b do: 'b'
     5|
     6|
     7| __END__
=>#0    <main> at target.rb:3
(rdbg:binding.break) b ::Foo::Bar.foo
Unknown constant name: "Foo"
#1  BP - Method (pending)  ::Foo::Bar.foo
[1, 7] in target.rb
     1| binding.b do: 'b x.y.foo'
     2| binding.b do: 'b Foo::Bar.foo'
     3| binding.b do: 'b ::Foo::Bar.foo'
=>   4| binding.b do: 'b'
     5|
     6|
     7| __END__
=>#0    <main> at target.rb:4
(rdbg:binding.break) b
#0  BP - Method (pending)  Foo::Bar.foo
#1  BP - Method (pending)  ::Foo::Bar.foo

Now method breakpoints accepts `expr.name` and `expr#name`.
And with any `expr` can become a pending method bp.
However, general `expr` in other context does not make sense,
so only `ClassName` style expressions can become pending bps.
They can be activated when the `ClassName#foo` is defined.
@ko1 ko1 force-pushed the fix_method_bp branch from 474d888 to 78fb291 Compare July 11, 2022 15:25
@ko1 ko1 merged commit ac5fc97 into master Jul 11, 2022
@ko1 ko1 deleted the fix_method_bp branch July 11, 2022 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants