All IntelliJ run configurations disappeared

Intellij Idea

Intellij Idea Problem Overview


After IntelliJ IDEA froze and was killed from the task manager, all the Run/Debug Configurations disappeared. I have tried invalidating caches, reloading files from disk, synchronizing and restarting, but nothing helped.

Intellij Idea Solutions


Solution 1 - Intellij Idea

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.

Solution 2 - Intellij Idea

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.

Solution 3 - Intellij Idea

To me, this frequently happened on switching branches. Turning off "restore workspace on branch switching" helps to prevent the run configurations from getting lost.

enter image description here

Solution 4 - Intellij Idea

Run configurations are stored in your project files. When IntelliJ (or your computer with IntelliJ running) crashes hard, the project files can become corrupted and unreadable. I don't know of a way to recover this unless you have your project files are backed up somewhere.

Solution 5 - Intellij Idea

Navigate to your project folder and check weather any .idea folder is created or not, if created copy your project and paste it other location ant try opening it; it will work.

Solution 6 - Intellij Idea

For every project in intellij there's a file created with all the configurations related to it. Under the root directory of the project there's a hidden folder .idea in it is the workspace.xml with the configuration. workspace.xml is comprised of components one of which is responsible to hold the run/debug configurations.

If this file is getting corrupted it's difficult to restore these configurations if you don't have a backup of workspace.xml. to overcome it: 1. in intellij right click the workspace.xml file under project view and choose Local History -> Show History 2. if there's no history you can copy the component from a coworker with similar configurations. 3. backup in advance the workspace.xml and retrieve the RunManager component from it..

another good choice is to use the share option. under each project's definition there's a checkbox share

Marking this checkbox will extract the definition for this project to an external location: under the same .idea folder a new folder is being created runConfigurations and the configurations per project are being represented there in xml files.

The advantage of using share is that it can be copied and used for similar projects under other branched like QA and production

Solution 7 - Intellij Idea

I sometimes have the problem that all the run/debug configurations are not created from CMake after being lost. I solved this by just deleting the whone list of configurations from the workspace.xml (from .idea folder).

Solution 8 - Intellij Idea

This happened to me recently and I just restarted IntelliJ and they shared ones (in .run) are now restored.

Solution 9 - Intellij Idea

In my case what happened was I did something that made IntelliJ recognize the project as a new application type, so it thought my old configuration was not valid for my project anymore and wasn't displaying it to me. I reverted my changes and the configuration appeared as an option again.

Solution 10 - Intellij Idea

Very annoying problem in Intellij Idea for many years.

It's quite often breaks because of broken (connection to?) Ant debugger, used to create run configs.

I was periodically searching for a solution, but no success. Then today after disappeared Run Config to display in panel I did inspect contents of workspace.xml. All the run configs were there.

And then it turns out to be 7+ years bug clue... Always spring out non-called Ant...

Happily, contents of workspace.xml in place with all your run config items, you can just

  • disable infamous plugin Ant debugger,
  • reload the project,

and all your run configs are displayed and available again))).

Happy to share with all of you the solution).

Solution 11 - Intellij Idea

In my case, i've accidentally pressed Alt + Home and this bar disappeared, this combination toggles run bar at the top of IDEA window for me.

Here the screen with my bound actions on this keys. I hope it should help enter image description here

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionIdo.CoView Question on Stackoverflow
Solution 1 - Intellij IdeaCrazyCoderView Answer on Stackoverflow
Solution 2 - Intellij IdeaCrniView Answer on Stackoverflow
Solution 3 - Intellij IdeaberslingView Answer on Stackoverflow
Solution 4 - Intellij IdeaRyan StewartView Answer on Stackoverflow
Solution 5 - Intellij IdeaAdarsh JView Answer on Stackoverflow
Solution 6 - Intellij IdeaItamar LevView Answer on Stackoverflow
Solution 7 - Intellij IdeaJordanView Answer on Stackoverflow
Solution 8 - Intellij IdeavaughanView Answer on Stackoverflow
Solution 9 - Intellij IdeaTroy NechanickyView Answer on Stackoverflow
Solution 10 - Intellij IdeaWebComerView Answer on Stackoverflow
Solution 11 - Intellij IdeaanecahevView Answer on Stackoverflow