如何让 Eclipse 在堆栈溢出时中断?
我得到一个堆栈跟踪,表明由非终止程序引起的堆栈溢出。但是我不知道如何让 Eclipse 调试器在发生这种情况时中断。
我不想发布堆栈跟踪,但它以以下内容开头:
JVM Error!
at ___
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113)
at org.eclipse.jetty.server.Server.handle(Server.java:334)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:559)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:992)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:550)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:203)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:406)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:462)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436)
at java.lang.Thread.run(Unknown Source)
Caused by:
null
at ___
后面是一个非常长的重复函数调用序列。
感谢您的帮助
I get a stacktrace that indicates a stack overflow caused by a non-terminating program. However I don't know how to let the eclipse debugger break when this occurs.
I'd rather not post the stacktrace but it starts with:
JVM Error!
at ___
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113)
at org.eclipse.jetty.server.Server.handle(Server.java:334)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:559)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:992)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:550)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:203)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:406)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:462)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436)
at java.lang.Thread.run(Unknown Source)
Caused by:
null
at ___
Followed by a very long repeating sequence of function calls.
Thanks for any help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以让调试器在出现异常时中断。在您的情况下,请尝试中断
java.lang.StackOverflowError
检查一下:
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.user/reference/views/breakpoints/ref-breakpoints_view.htm
You can let the debugger break on Exceptions. In your case, try breaking on the
java.lang.StackOverflowError
Check this out:
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.user/reference/views/breakpoints/ref-breakpoints_view.htm
您可以将调试器设置为在编辑时中断 -
在“调试”透视图中。
选择“添加异常断点”命令以添加 Java 异常断点。
在出现的对话框中:
根据需要选择“捕获”和“未捕获”以指示要暂停程序的异常类型。
You can set the debugger to break on edit -
In the Debug perspective .
Select the Add Exception Breakpoint command to add a Java exception breakpoint.
In the resulting dialog:
Select Caught and Uncaught as needed to indicate on which exception type you want to suspend the program.
增加内存大小。当您运行程序时,将其传递给 VM Args。
Xms512m -Xmx512m -XX:PermSize=256m -XX:MaxPermSize=256m
Increase your memerory size. When you running program pass this into VM Args.
Xms512m -Xmx512m -XX:PermSize=256m -XX:MaxPermSize=256m