eclipse 调试模式超时Tomcat
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10783870/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Debug Mode timeout Tomcat
提问by Global Warrior
I try to start my Tomcat in debug mode but it throws the following error:
我尝试在调试模式下启动我的 Tomcat,但它抛出以下错误:
Server Tomcat v7.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor
Server Tomcat v7.0 Server at localhost 无法在 45 秒内启动。如果服务器需要更多时间,请尝试在服务器编辑器中增加超时时间
I even tried to update the timeout time but it still gets timed out. But, when I try to start the tomcat (in non debugging mode) it starts normally. Any idea what might be causing problem?
我什至尝试更新超时时间,但它仍然超时。但是,当我尝试启动 tomcat(在非调试模式下)时,它会正常启动。知道什么可能导致问题吗?
回答by Global Warrior
Figured out the reason. If we have too many breakpoints the debug mode strangely takes too much time to start. Disable all the breakpoints and start in debug mode, when started enable the breakpoints as needed.
想通了原因。如果我们有太多断点,调试模式会奇怪地花费太多时间来启动。禁用所有断点并以调试模式启动,启动时根据需要启用断点。
回答by John Watts
Could it be waiting for you to connect?
难道是在等你连接?
The docs say to type:
文档说要输入:
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
but if you typed suspend=y, it would wait forever eventually timing out.
但是如果你输入 suspend=y,它将永远等待最终超时。