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.
你可能知道 rake 吞下未捕获异常的完整回溯。如果我想要完整的回溯,我需要添加 --trace 选项。我觉得这很烦人,因为我的一些任务需要很长时间才能运行(最多 6 小时),当它崩溃时我没有任何调试信息。我需要使用 --trace 再次运行它。最重要的是,系统可能与错误发生时的状态不同,因此之后可能不会显示。我总是必须在任何任务上添加 --trace 。这显示了我不想在任务执行时看到的东西。
有没有办法改变这种默认行为?(我认为这根本没有用)
假设您可以进入 Rakefile 并添加:
Rake.application.options.trace = true
在寻找解决我自己遇到的问题的方法时,我很偶然地在这里发现了这一点。