All IntelliJ run configurations disappeared
You can try to restore your Run configuration using the Local History feature of IntelliJ IDEA.
If you are using .idea
directory based format, then your configurations will reside in workspace.xml
file under .idea
directory, invoke Local History dialog from the .idea directory right click menu in IDEA Project View, select the label some time before the crash and revert the old copy of workspace.xml
.
In case .ipr
file based format is used, your configurations will be stored in the <project>.iws
file in the project root which you can restore in a similar way.
If the configurations were Shared, they are stored in .idea\runConfigurations
directory as separate XML files or in the <project>.ipr
file (if old project format is used).
If the Local history is blank and you are in Windows, try Restore previous versions right clicking the workspace.xml
file or the <project>.iws
one in Windows Explorer.
To me, this frequently happened on switching branches. Turning off "restore workspace on branch switching" helps to prevent the run configurations from getting lost.
You can go to your main project and right click on it, select local history --> show history. Find some point in time where you think that system was stable (before crash) and click revert. This worked for me.