本文介绍了Eclipse - 调试器不会在断点处停止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图麻烦拍摄一个JUnit。在源代码中,我已经在两个地方设置了断点:1)在静态成员初始化的行中2)一个测试用例的第一行。



调试器在静态字段初始化行中停止。但在测试用例中并不停止。无论我在测试用例中设置断点,调试器都不会停止。我知道确定测试用例是执行的,因为我可以看到我添加的日志消息显示在日志中。



任何帮助将不胜感激。 p>

我正在使用Eclipse Galileo和JUnit4启动器。

解决方案

与。



如果这确实是个问题,你应该转到更高版本的JDK(这是不能保证的,因为)。最好的办法是使用-XX:+ UseParallelGC标志。增加最小和最大堆大小的大小,延迟第一个GC,带来临时缓解。



顺便说一下,使用,以跟踪其他人如何发展。


I am trying to trouble shoot a JUnit. In the source code, I have set break point in two places: 1) in a line where a static member is initialized 2) the first line of one of the test cases.

The debugger stops in the static field initializing line. But it doesn't stop in the test case. No matter where I set the break point in the test case, the debugger doesn't stop there. I know for sure that the test case is executed as I can see the log messages that I have added appear in the log.

Any help would be greatly appreciated.

I am using Eclipse Galileo and JUnit4 launcher.

解决方案

This could be related to one of the bugs in JDK 6 Update 14, as indicated in the release notes for JDK 6 update 15.

If this indeed turns out to be the issue, you should move to a higher version of the JDK (that's no guarantee though, since fixes have been released against 6u16, 6u18 and 7b1). The best bet is to use -XX:+UseParallelGC flag. Increasing the size of the minimum and maximum heap size, to delay the first GC, bring temporary relief.

By the way, use this bug report in Eclipse to track how others have been faring.

这篇关于Eclipse - 调试器不会在断点处停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 21:05