91

I would like to create a script to modify my debug configuration in intellij. The path of tomcat changes, and i have to manually go into the run config and edit things. I have tried to find the place where intellij stores these settings to no avail.

question: does anyone know where IJ stores its run configuration

mkoryak
  • 57,086
  • 61
  • 201
  • 257

2 Answers2

140

The location would depend on 2 factors, whether the configuration is local to the user or shared with the other developers and if you are using the file based (legacy) or the directory based project format.

  • File based project, local configuration: .iws file
  • Directory based project, local configuration: workspace.xml file under .idea directory
  • File based project, shared configuration: .ipr file
  • Directory based project, shared configuration: .xml file under runConfigurations subdirectory of .idea directory or files inside .run directory in the project root (you can customize the location of the shared configurations in the latest versions).
CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • 1
    +1, useful! I currently have my Tomcat configs in .idea/workspace.xml - any idea how I could easily switch to having them under runConfigurations (for easier sharing)? – Jonik Jul 12 '11 at 08:50
  • 59
    Use `Share configuration` checkbox in the Run/Debug configuration settings. – CrazyCoder Jul 12 '11 at 08:54
  • `.xml` file sunder `runConfigurations` are awesome but for some reason IDEA keeps changing them frequently (just reorders the list of environment variables for instance). – Nader Ghanbari Nov 11 '15 at 09:59
  • Clicking "Share" and then "Apply" didn't do the trick for me. I had to exit out of the Run/Debug Configurations screen in intellij before the `runConfigurations` directory appeared. – L42 Dec 24 '16 at 15:38
  • For new versions of IntelliJ, the "share" option is replaced with "store as project file". Compare this answer: https://stackoverflow.com/a/64263851/2792414 – Hermann.Gruber May 11 '23 at 12:15
31

Its here .idea\runConfigurations (correct for Idea 11). Just copy this folder to new project.

EDIT: As per comment, if runConfigurations folder doesn't exist, check the 'Share' box inside the Run/Debug configuration

Community
  • 1
  • 1
user590444
  • 4,252
  • 8
  • 36
  • 43