question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not able to Run->Debug in Intellij Idea 2022.1, it shut's down immediately with exit code 2

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Play framework: Not able to Run->Debug/Run in Intellij Idea ...
Play framework: Not able to Run->Debug/Run in Intellij Idea 2022.1 on Windows, it shuts down immediately with exit code 2. 5.
Read more >
Why debug in Intellij Idea not working with no error code
This is a normal behavior when debugger didn't hit any breakpoints. Your application just completes and exits.
Read more >
New features in Android Studio Preview
Discover new features and changes in Android Studio preview. ... highlights lines of code that are related to crashes so you can easily...
Read more >
Java Remote Debugging with IntelliJ: A Tutorial from Rookout
You need admin access to the server to apply remote debug settings, which may not always be possible in a production environment. Remote ......
Read more >
Known Issues — FIRST Robotics Competition documentation
This is caused by a bug in the VS Code extension related to the way the WPILib Command library vendordeps were created. This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found