playframework / playframework/playframework
Not able to Run->Debug in Intellij Idea 2022.1, it shut's down immediately with exit code 2
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 12.6k
- Forks
- 4k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 29
Description
I 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are named. Start by reproducing the issue with the Play Java seed project on Windows using IntelliJ IDEA 2022.1, Java 11, and the documented sbt settings, then compare the debugger output with sbt run and the reported --export-rt error. Done means Run→Debug no longer exits immediately with code 2.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, scala
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100