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

1
8 comments

Hi.

 

Do you have .idea folder under version control? Try switching back and invalidating caches (File | Invalidate cache).

1

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.

1

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 

0

This issue is still there

IntelliJ IDEA 2021.1.1 (Comunity Edition)

on Ubuntu 20

0

Dong Yao do you have the steps to reproduce it?

0

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.

0

Hello Elie,

Is it possible to share idea.log ("Help | Show Log in...") after restarting IDE and reproducing the issue?

0

Please sign in to leave a comment.