Is there any way to use the command line to debug an ERB file? I would like to know if there is any way to get rdeb开发者_如何学Cug or rdebug-ide to do this.
What if you monkey patch the method you need, and you include a call to debugger
? You'd need the ruby-debug
gem for the debugger
method.
There probably is, but I have been doing the equiv of print.
puts YAML::dump(variable)
Try something like, STDERR.puts "Debug message"
and it'll appear in the console window or in your log if it's Rails or Sinatra.
精彩评论