Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
DOS の bash -x や @echo on のように、すべての行を実行するたびに ruby スクリプトをエコー バックする (またはファイルにログを記録し、tail -f を実行する) 方法はありますか?
ruby -w はそれを行いません-警告などの冗長性を高めるだけです.
Unroller を調査しましたが、機能しません。おそらく古すぎます。コンパイルできない依存関係。
私はirbをよく使用しますが、この場合、非インタラクティブなものが必要です。死後の検査をする。
使用できます
ruby -rtracer [your_script.rb]
できるruby-debugもあります
rdebug --trace [your_script.rb]
IRBはそのトリックを行います:
irb script.rb