6

Intellij IDEA will automatically create a run/debug configuration when you run any item that doesn't have a permanent run/debug configuration already present.

You can then save the run/debug configuration that was generated to make it permanent.

When you save a configuration, where is it saved?

LightCC
  • 9,804
  • 5
  • 52
  • 92
  • As near as I can tell, they're saved in `/.idea/workspace.xml`. – Slaw Nov 11 '18 at 02:19
  • 1
    And if you mark a configuration as shared, it will be stored in a sub-folder under `.idea`. That you can use to copy the configuration to another project. – yegodm Nov 11 '18 at 03:41
  • @yegodm Thanks - I finally put 2-and-2 together and realized that your comment explains how to make the configurations separate from the `workspace.xml` file (per Slaw's comment and Sand's answer) so that it will be saved by git into a repo (that file is excluded by the `.gitignore` files I found for good reason). That's the real problem I was trying to solve! – LightCC Nov 12 '18 at 04:51

1 Answers1

9

run/debug configurations for a project are stored in the .idea/workspace.xml file inside the project location. You can see those entries under the <component name="RunManager" node if you search for "RunManager" in that file.

enter image description here

Sandeepa
  • 3,457
  • 5
  • 25
  • 41