P
Peña, Botp
Hi,
sometimes (or many times), i put some debugging lines in my code. =
something like,
C:\family\ruby>cat -n debugger.rb
1 #-----------------
2 # debugger.rb
3 #-----------------
4
5 DEBUG_MACRO_1=3D'puts "FILE: #{__FILE__} LINE: #{__LINE__}, ID: =
#{[self
to_s, self.object_id]}"'
6
7 def debugger bin
8 eval(DEBUG_MACRO_1,bin)
9 end
C:\family\ruby>cat -n test5.rb
1 #------------
2 # test5.rb
3 #------------
4
5 require 'debugger.rb'
6
7 class A
8 def a
9 debugger binding #<-- this is my debugging line
10 end
11 end
12
13 A.new.a
C:\family\ruby>ruby test5.rb
FILE: test5.rb LINE: 9, ID: #<A:0x28804bc>21234270
I'd like to pass the "binding" argument as default on the debugger line, =
so that i do not have to state it; ie, just "debugger" instead of =
"debugger binding". Is that possible? tips, pls
kind regards -botp
sometimes (or many times), i put some debugging lines in my code. =
something like,
C:\family\ruby>cat -n debugger.rb
1 #-----------------
2 # debugger.rb
3 #-----------------
4
5 DEBUG_MACRO_1=3D'puts "FILE: #{__FILE__} LINE: #{__LINE__}, ID: =
#{[self
to_s, self.object_id]}"'
6
7 def debugger bin
8 eval(DEBUG_MACRO_1,bin)
9 end
C:\family\ruby>cat -n test5.rb
1 #------------
2 # test5.rb
3 #------------
4
5 require 'debugger.rb'
6
7 class A
8 def a
9 debugger binding #<-- this is my debugging line
10 end
11 end
12
13 A.new.a
C:\family\ruby>ruby test5.rb
FILE: test5.rb LINE: 9, ID: #<A:0x28804bc>21234270
I'd like to pass the "binding" argument as default on the debugger line, =
so that i do not have to state it; ie, just "debugger" instead of =
"debugger binding". Is that possible? tips, pls
kind regards -botp