Is there an easy way to run or open a run configuration stored as file which is not yet part of the project run configurations?
I have got a Maven project with a lot of Maven modules. Some of the modules contain a folder named "launch-config-idea" which contain several launch configs which are also part of the version control system. When the project is freshly checked out and freshly built by Maven, these launch configs are not yet part of the Run/Debug Configurations Editor which can be opened via "Run -> Edit configurations...".
Let's say I have got a run configuration called "MyRunConfig.run.xml" which is shown in the project window in one of the above-mentioned folders. And let's say I would like to run this configuration or open it in the Run/Debug Configurations Editor. When I right-click this file, there is nothing like "Open run configuration" or "Run" in the context menu. The only thing I can do is open then file in the editor. Then IntelliJ Idea displays a message saying "Manual editing of this file is not recommended" and offers me to "Open Run/Debug Configurations":
When I do that, the run config gets included into the Run/Debug Configurations Editor and can be run from there.
This works but it seems a bit long-winded and awkward to me. Is there no easier way to run or open a run configuration file from the project window?
Please sign in to leave a comment.
If you change the path of one run configuration in the settings, IDE should load all the XML files from that folder:
I think my question was a bit too quick: After I had checked out the modules containing the Run Configurations, Idea took a moment to index the new files. During this process, it seemed to have discovered the new run configuration files and showed them automatically in the Run/Debug Configuration Editor after that. So there is no need for a "Run" or "Open" entry in the context menu of the project window as Idea includes the run configurations automatically.