From: Sys Ppp Date: 2009-08-23T07:52:55+09:00 Subject: ruby-debug does not hit breakpoints at class-methods 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: 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: 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'. -- Posted via http://www.ruby-forum.com/.