Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
ruby-debug does not hit breakpoints at class-methods
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Sys Ppp, post: 4646906"] ruby-1.8.6-p369 ruby-debug-0.10.3 How to set breakpoints at class-methods without editing source of library files? And without line numbers? $ cat test.rb require 'ruby-debug' class Aaa def self.cl_aaa puts 'A A A' end def initialize @aaa = 'a a a' end def aaa puts @aaa end end debugger a = Aaa.new Aaa.cl_aaa a.aaa $ ruby test.rb < or > $ rdebug test.rb test.rb:<lineno of debugger> a = Aaa.new (rdb:1) b Aaa:cl_aaa Breakpoint 1 at Aaa::cl_aaa (rdb:1) b Aaa:aaa Breakpoint 2 at Aaa::aaa (rdb:1) i b Num Enb What 1 y at Aaa:cl_aaa 2 y at Aaa:aaa (rdb:1) cont A A A Breakpoint 2 at Aaa:aaa test.rb:<lineno of 'def aaa'> def aaa (rdb:1) i b Num Enb What 1 y at Aaa:cl_aaa 2 y at Aaa:aaa breakpoint already hit 1 time (rdb:1) cont a a a $ The same result if it was used '#' or '.' instead of ':', i.e. 'Class#method' or 'Class.method'. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
ruby-debug does not hit breakpoints at class-methods
Top