在以下的Ruby代码中:
#! /usr/bin/env ruby
require 'debugger'
def hello
puts "hello"
if block_given?
yield
end
end
def main
debugger
puts "test begin..."
hello do # <= if you are here
puts "here!" #<= how to get here without setting bp here or step into hello?
end
end
main
在调试过程中,经常会遇到这样的情况,我并不关心将控制权传递给块的函数的实现,我只想直接步入块中,而不需要手动在那里设置断点。
在ruby-debug19或调试器中是否支持这种“步入块”的功能?
c
不是只会让它一直运行到结尾吗? - Leopd