IntelliJ Run Configurations Disappear
Answered
Lately, when I switch between Git branches in my project, my run configurations disappear! As far as I can tell, there is no way to get them back. Even when I switch back to the previous branch, my run configuration is gone. I recently updated to the latest IntelliJ:
IntelliJ IDEA 2018.1.2 (Ultimate Edition)
Build #IU-181.4668.68, built on April 24, 2018
JRE: 1.8.0_152-release-1136-b29 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-15-generic
Please sign in to leave a comment.
Hi.
Do you have .idea folder under version control? Try switching back and invalidating caches (File | Invalidate cache).
See also http://stackoverflow.com/a/3136255/104891.
Google brought me here, having this problem as described. In my case it was specifically JUnit run configurations that disappeared and .idea wasn't under version control.
I opened workspace.xml in my project looking for insights and I noticed for the JUnit configuration:
<configuration name="All tests" type="JUnit" factoryName="JUnit" temporary="true">
I removed temporary="true" at the end of this line and now I don't lose this configuration when changing branches.
Same problem was happened many times.
When I disabled "restore workspace on branch switching" function, the problem looks like going away.
This is my environment.
IntelliJ IDEA 2019.3.3 (Comunity Edition)
Build #IC-193.6494.35, built on February 11, 2020
Runtime version: 11.05+10-b520.38 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
This issue is still there
IntelliJ IDEA 2021.1.1 (Comunity Edition)
on Ubuntu 20
Dong Yao do you have the steps to reproduce it?
For me it is as simple as:
Start IntelliJ.
Open project
Create Run config and optionally run it.
Close IntelliJ.
Start IntelliJ. Config list is empty.
Hello Elie,
Is it possible to share idea.log ("Help | Show Log in...") after restarting IDE and reproducing the issue?
Hello Yaroslav,
I have the same issue again and again. It is even enough to create a new maven run config, close the IDEA and start it again. After restart the run config disappears.
Here the stacktrace from log file:
A look into .idea/workspace.xml file shows, that there is an error in saven configuration
Hope this helps to solve the issue
This appears to be a known issue IDEA-340760, which is addressed in the current EAP and should also be included in the upcoming update for 2023.3.