开发者

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

开发者 https://www.devze.com 2022-12-12 03:36 出处:网络
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 nee

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

精彩评论

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