简体   繁体   English

Eclipse Java调试器突然停止工作?

[英]Eclipse java debugger suddenly stops working?

I am using Eclipse Luna Service Release 1a (4.4.1) with JRE7 and LibGDX 1.6.1 - The debugger was working nicely yesterday and it just stops working right at the first few lines of code. 我正在将Eclipse Luna Service Release 1a(4.4.1)与JRE7和LibGDX 1.6.1一起使用-调试器昨天运行良好,并且仅在代码的前几行就停止了工作。

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;

public class Main {
    public static void main(String[] args) {
        LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
        cfg.title = "Scene2D";
        cfg.useGL30 = false;
        cfg.width = 480;
        cfg.height = 320;

        new LwjglApplication(new Main_Scene2D(), cfg);
    }
}

In the source code above, I can set a breakpoint at any line and step thru the rest of but it does not stop at Main_Scene2D() as I set a breakpoint in there. 在上面的源代码中,我可以在任何行上设置一个断点,然后逐步执行其余部分,但是由于我在其中设置了断点,所以它不会在Main_Scene2D()处停止。 The debug tab shows: 调试选项卡显示:

Main [Java Application]
com.xxx.tutorials.libgdx.UI.Scene2D.Main at localhost:61386
Thread [main] (Running)
C:\\Program Files (x86)\\Java\\jre7\\bin\\javaw.exe (Jan 20, 2016, 12:11:14 AM)

Please help ! 请帮忙 ! Thanks 谢谢

By pausing the debugger and resuming it, I figured out the execution is looping and waiting for Audio input (?) so I just add a new statement cfg.disableAudio in the main: 通过暂停调试器并恢复它,我发现执行正在循环并等待音频输入(?),因此我只在主行中添加了一条新语句cfg.disableAudio:

public static void main(String[] args) {
    LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
    cfg.title = "Scene2D";
    cfg.useGL30 = false;
    cfg.width = 480;
    cfg.height = 320;
    cfg.disableAudio = true;

    new LwjglApplic ation(new Main_Scene2D(), cfg);
}

and the debugger behaves as normal now. 并且调试器现在表现正常。 The problem is what happens to my Audio. 问题是我的音频发生了什么。 That's a different story. 那是另外一个故事。 Thanks. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM