I am running into a strange problem lately which did not occur before in my Rails 3.2.12 application. I use the debugger gem extensively to debug my application and usually I never had this problem while debugging in the development environment.
我最近遇到了一个奇怪的问题,这在我的Rails 3.2.12应用程序中没有出现过。我广泛使用调试器gem来调试我的应用程序,通常我在开发环境中调试时从未遇到过这个问题。
I put a breakpoint in my code by inserting a debugger statement where I want the debugger to break. This works correctly. I can examine the variables and step over a few statements nicely. However, when I say 'cont' which is short for continue to let the program run to the next breakpoint or display the results of computation, I am getting the timeout error as shown below:
我在代码中添加了一个断点,通过插入调试器语句,我想让调试器中断。这工作正常。我可以检查变量并很好地跳过几个语句。但是,当我说'cont'是继续让程序运行到下一个断点或显示计算结果的缩写时,我收到超时错误,如下所示:
Timeout::Error: execution expired:
超时::错误:执行已过期:
ActiveRecord::StatementInvalid - Timeout::Error: execution expired:
ActiveRecord :: StatementInvalid - 超时::错误:执行过期:
This never happened to me in the development mode until recently. I am not sure where the problem is. I don't mind setting the timeout to a high number in development mode so that I can debug my application without having to restart it frequently.
直到最近,我才在开发模式中遇到这种情况。我不确定问题出在哪里。我不介意在开发模式下将超时设置为高数,这样我就可以调试我的应用程序而无需经常重启它。
Please advise.
请指教。
Thanks.
谢谢。
Bharat
巴拉特
0
do this:
做这个:
# config/initializers/timeout.rb <-- create this file
Rack::Timeout.timeout = 120 # seconds
本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.silva-art.net/blog/2013/12/19/535d93c6e08a39603e730bd0279f9d5a.html。