java - 调试时使用 Java 8 在 ClassLoader 上中断 Eclipse

标签 java eclipse debugging breakpoints

我在我的一些项目中迁移到 java 8,并注意到每个设置为使用 java 8 运行的项目在调试时都会无缘无故地中断......

当我在 Debug模式下运行项目时,Eclipse 只是在第 436 行的类 ClassLoader 中中断,这是 synchronized

的右花括号

这是jre lib中类的部分代码

protected Class<?> loadClass(String name, boolean resolve)
    throws ClassNotFoundException
{
    synchronized (getClassLoadingLock(name)) {
        // First, check if the class has already been loaded
        Class<?> c = findLoadedClass(name);
        if (c == null) {
            long t0 = System.nanoTime();
            try {
                if (parent != null) {
                    c = parent.loadClass(name, false);
                } else {
                    c = findBootstrapClassOrNull(name);
                }
            } catch (ClassNotFoundException e) {
                // ClassNotFoundException thrown if class not found
                // from the non-null parent class loader
            }

            if (c == null) {
                // If still not found, then invoke findClass in order
                // to find the class.
                long t1 = System.nanoTime();
                c = findClass(name);

                // this is the defining class loader; record the stats
                sun.misc.PerfCounter.getParentDelegationTime().addTime(t1 - t0);
                sun.misc.PerfCounter.getFindClassTime().addElapsedTimeFrom(t1);
                sun.misc.PerfCounter.getFindClasses().increment();
            }
        }
        if (resolve) {
            resolveClass(c);
        }
        return c;
    } // <-- This is line 436 where it breaks just right after I click on the debug mode
} 

然后我必须点击播放,一切顺利,但每次我想调试一个让我发疯的应用程序时,这样做太麻烦了。试图找到与此相关的任何东西,但没有运气。

我也检查了断点 View ,有任何。还检查了 Skip all breakpoints 按钮,但似乎没有任何反应。

还要下载一个新的干净的 Eclipse 并且仍在进行。

截图如下:

debug breakpoint

最佳答案

我通过禁用Step Filtering 修复了它

enter image description here

关于java - 调试时使用 Java 8 在 ClassLoader 上中断 Eclipse,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28118467/

相关文章:

java - Java 不支持枚举上的协变返回类型吗?

java - 将谷歌Chrome浏览器集成到eclipse中

java - 使用 Eclipse Indigo 时获取 realpath 的问题

c++ - 跟踪第 3 方库中的段错误:cv::ImageCodecInitializer 析构函数崩溃

java - 如何解决 JBOSS 部署错误 : Packages waiting for a deployer?

java - 如何修复 : No view found for id 0x7f0d00aa?

c++ - 如何在 Visual Studio 2010 中查看二维数组的所有元素?

ruby - 如何使用 Aptana Studio 3 和 rbenv 调试 Ruby 脚本?

java.sql.SQLException : Before start of result set. 结果集循环内的查询如何?

java - Eclipse 中是否有用于 ANT 任务的 SecureInputHandler?