【发布时间】:2012-07-25 19:58:31
【问题描述】:
在以下 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 或调试器中是否存在对这种“步入块”的支持?
【问题讨论】: