开发者

Is there any way to use the command line to debug an ERB file?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜