Eclipse - 调试器不会在断点处停止 [英] Eclipse - debugger doesn't stop at breakpoint

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

问题描述

我正在尝试对 JUnit 进行故障排除.在源代码中,我在两个地方设置了断点:1) 在初始化静态成员的行中 2) 一个测试用例的第一行.

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.

任何帮助将不胜感激.

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

I am using Eclipse Galileo and JUnit4 launcher.

推荐答案

这可能与 JDK 6 Update 14,如 JDK 6 update 15 的发行说明中所示.

如果这确实是问题所在,则您应该迁移到更高版本的 JDK(但这并不能保证,因为 已针对 6u16、6u18 和 7b1 发布修复程序).最好的办法是使用 -XX:+UseParallelGC 标志.增加最小和最大堆大小,延迟第一次GC,暂时缓解.

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.

顺便说一下,使用Eclipse中的这个bug报告来跟踪其他人的表现如何.

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

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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆