After crash cannot view stdout or obtain useful stack trace

已回答

IntelliJ newbie here sorry if this is a dumb question. I am using gradle to build my libjdx app in IntelliJ Idea. During execution I can see console output generated via System.out.println. When my app crashes I have two problems:

- The console output disappears

- I get no useful stacktrace

I tried to create a stacktrace by adding --stacktrace to my gradle run task, with the result that I get over a hundred lines of useless stuff like this, with no references to my actual code:

    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
 

This junk is appearing in the same window that my console output used to be in, and my previous console output has vanished, even if I scroll all the way up. So I have no way to debug my program. Any help appreciated!!!

0

Use Editor | General | Console | Override console cycle buffer size (1024 KB) to increase the console buffer size.

You can also try running your code without Gradle, but via Application configuration and disable Gradle delegation (use IntelliJ IDEA option instead): https://www.jetbrains.com/help/idea/work-with-gradle-projects.html#delegate_build_gradle .

 

0

Thanks, I might try this. But Gradle is a default build manager, right? Surely it should not suffer from these weird problems…

0

Try running Gradle from the system terminal. If it has the same issue, not sure why you report it as IntelliJ IDEA problem.

0

请先登录再写评论。