Not able to Run->Debug in Intellij Idea 2022.1, it shut's down immediately with exit code 2
See original GitHub issueI face what seems like a similar issue as #11086 with 2.8.15 and the latest IntelliJ Idea (IntelliJ IDEA 2022.1 (Ultimate Edition) Build #IU-221.5080.210, built on April 12, 2022). Just like with the problem above it works fine running sbt run
but not Idea->Run->Debug.
It works perfectly well on linux, but not on two different Windows computers.
Reproduce:
- Create a brand new project with
sbt new playframework/play-java-seed.g8
- Open with Idea
- Use run->debug->sbt task with “Use sbt shell” disabled
- IntelliJ is configured with Oracle OpenJDK 11.0.14, SBT Shell use for both “project reloads” and “build”. “Use Play 2 compiler for this project” is disabled (tried both).
When starting the debugger it builds just fine, but when it after building opens the debugger console it exits immediately:
Connected to the target VM, address: ‘127.0.0.1:52457’, transport: ‘socket’ Disconnected from the target VM, address: ‘127.0.0.1:52457’, transport: ‘socket’ Process finished with exit code 2
Closing Idea and running call sbt run > test.log 2>&1 works, but maybe the first error is the problem? Output from test.log:
A subdirectory or file [info] welcome to sbt 1.6.2 (Oracle Corporation Java 11.0.14) already exists. [info] welcome to sbt 1.6.2 (Oracle Corporation Java 11.0.14) [info] loading settings for project global-plugins from idea.sbt … [info] loading global plugins from C:\Users\Eirik.sbt\1.0\plugins [info] loading settings for project microlog-learn-play-build from plugins.sbt … [info] loading project definition from C:\Users\Eirik\microlog-learn-play\project [info] loading settings for project root from build.sbt … [info] set current project to microlog-learn-play (in build file:/C:/Users/Eirik/microlog-learn-play/) [error] Expected ‘error’ [error] --export-rt [error] ^ [info] welcome to sbt 1.6.2 (Oracle Corporation Java 11.0.14) [info] loading settings for project global-plugins from idea.sbt … [info] loading global plugins from C:\Users\Eirik.sbt\1.0\plugins [info] loading settings for project microlog-learn-play-build from plugins.sbt … [info] loading project definition from C:\Users\Eirik\microlog-learn-play\project [info] loading settings for project root from build.sbt … [info] set current project to microlog-learn-play (in build file:/C:/Users/Eirik/microlog-learn-play/)
— (Running the application, auto-reloading is enabled) —
[info] p.c.s.AkkaHttpServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Enter to stop and go back to the console…)
I tried SBT versions from 1.4.0->1.6.2 and also downgrading Play back to 2.8.8.
–>
Play Version
2.8.8 -> 2.8.14
API
Java 11.0.14
Operating System
Windows 10
Issue Analytics
- State:
- Created a year ago
- Comments:13 (6 by maintainers)
I have reported it to JetBrains as well: https://youtrack.jetbrains.com/issue/IDEA-293783/Not-able-to-Run-Debug-in-Intellij-Idea-2022-1-on-Windows-it-shut
Moved issue to Scala: https://youtrack.jetbrains.com/issue/SCL-20206/Not-able-to-Run-Debug-in-Intellij-Idea-2022-1-on-Windows-it-shut