How do I share IntelliJ Run/Debug configurations between projects?











up vote
101
down vote

favorite
16












I have many different versions of my app. Each one is a separate intellij project. Every time I open a new one, the list of configurations starts blank:



enter image description here



The annoying thing about this is I deploy to 1 vm and I have to copy and paste the debug configurations each time I want to test a different version. Intellij makes this dialog modal per Intellij Instance, so I can't copy and paste the fields between Project Instances.



I end up taking a screenshot of one configuration and copying the fields by hand into the other project. It's a pretty primitive solution. Is there a more convenient way to get a run configuration from one project to another?



I'm using Intellij 13 on Windows 7.





Can I share settings for IntelliJ Idea across different projects? may have the answer to this, but the question is different. It's about window layout. Therefore I don't consider it a duplicate.










share|improve this question
























  • See also Sharing IntelliJ IDEA default run configurations and params
    – Vadzim
    Nov 27 '17 at 16:39












  • Created a ticket for this. Go vote!
    – Eyal Roth
    Apr 15 at 20:16















up vote
101
down vote

favorite
16












I have many different versions of my app. Each one is a separate intellij project. Every time I open a new one, the list of configurations starts blank:



enter image description here



The annoying thing about this is I deploy to 1 vm and I have to copy and paste the debug configurations each time I want to test a different version. Intellij makes this dialog modal per Intellij Instance, so I can't copy and paste the fields between Project Instances.



I end up taking a screenshot of one configuration and copying the fields by hand into the other project. It's a pretty primitive solution. Is there a more convenient way to get a run configuration from one project to another?



I'm using Intellij 13 on Windows 7.





Can I share settings for IntelliJ Idea across different projects? may have the answer to this, but the question is different. It's about window layout. Therefore I don't consider it a duplicate.










share|improve this question
























  • See also Sharing IntelliJ IDEA default run configurations and params
    – Vadzim
    Nov 27 '17 at 16:39












  • Created a ticket for this. Go vote!
    – Eyal Roth
    Apr 15 at 20:16













up vote
101
down vote

favorite
16









up vote
101
down vote

favorite
16






16





I have many different versions of my app. Each one is a separate intellij project. Every time I open a new one, the list of configurations starts blank:



enter image description here



The annoying thing about this is I deploy to 1 vm and I have to copy and paste the debug configurations each time I want to test a different version. Intellij makes this dialog modal per Intellij Instance, so I can't copy and paste the fields between Project Instances.



I end up taking a screenshot of one configuration and copying the fields by hand into the other project. It's a pretty primitive solution. Is there a more convenient way to get a run configuration from one project to another?



I'm using Intellij 13 on Windows 7.





Can I share settings for IntelliJ Idea across different projects? may have the answer to this, but the question is different. It's about window layout. Therefore I don't consider it a duplicate.










share|improve this question















I have many different versions of my app. Each one is a separate intellij project. Every time I open a new one, the list of configurations starts blank:



enter image description here



The annoying thing about this is I deploy to 1 vm and I have to copy and paste the debug configurations each time I want to test a different version. Intellij makes this dialog modal per Intellij Instance, so I can't copy and paste the fields between Project Instances.



I end up taking a screenshot of one configuration and copying the fields by hand into the other project. It's a pretty primitive solution. Is there a more convenient way to get a run configuration from one project to another?



I'm using Intellij 13 on Windows 7.





Can I share settings for IntelliJ Idea across different projects? may have the answer to this, but the question is different. It's about window layout. Therefore I don't consider it a duplicate.







intellij-idea






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 2 at 19:04









Nick Humrich

7,88353769




7,88353769










asked Jul 8 '14 at 21:53









Daniel Kaplan

36.1k22141220




36.1k22141220












  • See also Sharing IntelliJ IDEA default run configurations and params
    – Vadzim
    Nov 27 '17 at 16:39












  • Created a ticket for this. Go vote!
    – Eyal Roth
    Apr 15 at 20:16


















  • See also Sharing IntelliJ IDEA default run configurations and params
    – Vadzim
    Nov 27 '17 at 16:39












  • Created a ticket for this. Go vote!
    – Eyal Roth
    Apr 15 at 20:16
















See also Sharing IntelliJ IDEA default run configurations and params
– Vadzim
Nov 27 '17 at 16:39






See also Sharing IntelliJ IDEA default run configurations and params
– Vadzim
Nov 27 '17 at 16:39














Created a ticket for this. Go vote!
– Eyal Roth
Apr 15 at 20:16




Created a ticket for this. Go vote!
– Eyal Roth
Apr 15 at 20:16












5 Answers
5






active

oldest

votes

















up vote
133
down vote



accepted










The best way to do this is to click the "share" checkmark next to Name field when you edit/create the configuration. You can get to this Dialog with Run > Edit Configurations.



enter image description here



The share check-mark pulls the setting out of your workspace.xml and instead puts it in the directory .idearunConfigurations. This is designed so you can share the setting with others.
You could copy this file and put it in the same location in all your idea projects.



However, in the future, you might want to consider using source control branches for app versions rather than separate projects. IntelliJ handles these very well.






share|improve this answer

















  • 1




    "you might want to consider using source control branches for app versions rather than separate projects" How does that work? I'm concerned that 20x source files will make Intellij run slower. Does it only consider one at a time?
    – Daniel Kaplan
    Jul 8 '14 at 22:12






  • 2




    @tieTYT Yes. How a source control branch works is that it edits all your local files to match the branch. Then you switch branches, it does it again. You end up having less space used in your local file system. Heres a good read for you: git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging
    – Nick Humrich
    Jul 8 '14 at 22:14








  • 2




    @tieTYT Basically, you only have one branch existing on your local machine at a time. When you want to work on another version, the source control changes it to that version for you. You wont have "20x source files" because you only have 1x at a time.
    – Nick Humrich
    Jul 8 '14 at 22:15












  • Ah, well at work we use SVN. That being said I am using the Git-SVN bridge locally. I have never switched to a different SVN branch from it though. I guess I'll give it a shot.
    – Daniel Kaplan
    Jul 8 '14 at 22:20






  • 2




    @jay you could always add the file to no be excluded in your .gitignore. !.idea/runConfidurations/name
    – Nick Humrich
    Sep 26 '16 at 21:58


















up vote
13
down vote













goto



Run > Edit Configuration > create or select existing configuration you want to use > click save and persist it on file system > click on share check mark


now copy this file from



 PROJECT_ROOT_DIRECTORY/.idea/runConfigurations/ConfigurationName.xml


to your NEW_PROJECT_ROOT_DIRECTORY/.idea/runConfigurations at the same place and it is available now to your run configuration






share|improve this answer























  • I think you have to check Share first like Humdinger said
    – Daniel Kaplan
    Jul 8 '14 at 22:09










  • yes fixed it <!-->
    – Jigar Joshi
    Jul 8 '14 at 22:10




















up vote
12
down vote













Run configurations are stored in .idea/workspace.xml by default. First alternative is to share this file but it is not feasible because you also share a lot of unnecessary configurations.
As already said, the first step is to check "share" option to separate run configurations from workspace.xml.



dispatching run configurations from workspace.xml



After that, I recommend adding runConfigurations to source control. But the main problem is, probably you have already marked .idea folder as ignored.
You can unignore the folder by configuring your source control system. For example, if you are using git, you can change .gitignore file as follows:



.idea/*
!/.idea/runConfigurations


don't forget adding * after .idea/



As the last step, add your run configurations to source control and enjoy your shared configurations!






share|improve this answer




























    up vote
    10
    down vote













    You should copy the folder



    ~/your-old-project/.idea/runConfigurations 


    to



    ~/your-new-project/.idea/


    That's the folder that contains the run configurations.






    share|improve this answer

















    • 4




      I believe you need to set them to "share" first as elaborated in the accepted answer.
      – Muhd
      May 23 '17 at 3:17


















    up vote
    0
    down vote













    This is not exactly an answer to your question but it answers a question similar to your question and one that I had, and I'm assuming others might as well.



    That is, How to save unit and instrumentation test run configurations? I usually right-click on the test directory which brings up a menu with the option to Run whatever is in that directory. AndroidStudio then creates a run configuration on the fly and in the Run Configuration drop-down menu a new option will appear, "Save new configuration?" or something similar.



    Clicking that option brings up the Run Configuration menu and at that point I check the Share box as many others have already mentioned. This then will prompt the version control system to ask me if I want to add this new run configuration file. If you haven't registered your version control system you can find the new files under .idea/runConfigurations.






    share|improve this answer





















      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














       

      draft saved


      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f24642147%2fhow-do-i-share-intellij-run-debug-configurations-between-projects%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      5 Answers
      5






      active

      oldest

      votes








      5 Answers
      5






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      133
      down vote



      accepted










      The best way to do this is to click the "share" checkmark next to Name field when you edit/create the configuration. You can get to this Dialog with Run > Edit Configurations.



      enter image description here



      The share check-mark pulls the setting out of your workspace.xml and instead puts it in the directory .idearunConfigurations. This is designed so you can share the setting with others.
      You could copy this file and put it in the same location in all your idea projects.



      However, in the future, you might want to consider using source control branches for app versions rather than separate projects. IntelliJ handles these very well.






      share|improve this answer

















      • 1




        "you might want to consider using source control branches for app versions rather than separate projects" How does that work? I'm concerned that 20x source files will make Intellij run slower. Does it only consider one at a time?
        – Daniel Kaplan
        Jul 8 '14 at 22:12






      • 2




        @tieTYT Yes. How a source control branch works is that it edits all your local files to match the branch. Then you switch branches, it does it again. You end up having less space used in your local file system. Heres a good read for you: git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging
        – Nick Humrich
        Jul 8 '14 at 22:14








      • 2




        @tieTYT Basically, you only have one branch existing on your local machine at a time. When you want to work on another version, the source control changes it to that version for you. You wont have "20x source files" because you only have 1x at a time.
        – Nick Humrich
        Jul 8 '14 at 22:15












      • Ah, well at work we use SVN. That being said I am using the Git-SVN bridge locally. I have never switched to a different SVN branch from it though. I guess I'll give it a shot.
        – Daniel Kaplan
        Jul 8 '14 at 22:20






      • 2




        @jay you could always add the file to no be excluded in your .gitignore. !.idea/runConfidurations/name
        – Nick Humrich
        Sep 26 '16 at 21:58















      up vote
      133
      down vote



      accepted










      The best way to do this is to click the "share" checkmark next to Name field when you edit/create the configuration. You can get to this Dialog with Run > Edit Configurations.



      enter image description here



      The share check-mark pulls the setting out of your workspace.xml and instead puts it in the directory .idearunConfigurations. This is designed so you can share the setting with others.
      You could copy this file and put it in the same location in all your idea projects.



      However, in the future, you might want to consider using source control branches for app versions rather than separate projects. IntelliJ handles these very well.






      share|improve this answer

















      • 1




        "you might want to consider using source control branches for app versions rather than separate projects" How does that work? I'm concerned that 20x source files will make Intellij run slower. Does it only consider one at a time?
        – Daniel Kaplan
        Jul 8 '14 at 22:12






      • 2




        @tieTYT Yes. How a source control branch works is that it edits all your local files to match the branch. Then you switch branches, it does it again. You end up having less space used in your local file system. Heres a good read for you: git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging
        – Nick Humrich
        Jul 8 '14 at 22:14








      • 2




        @tieTYT Basically, you only have one branch existing on your local machine at a time. When you want to work on another version, the source control changes it to that version for you. You wont have "20x source files" because you only have 1x at a time.
        – Nick Humrich
        Jul 8 '14 at 22:15












      • Ah, well at work we use SVN. That being said I am using the Git-SVN bridge locally. I have never switched to a different SVN branch from it though. I guess I'll give it a shot.
        – Daniel Kaplan
        Jul 8 '14 at 22:20






      • 2




        @jay you could always add the file to no be excluded in your .gitignore. !.idea/runConfidurations/name
        – Nick Humrich
        Sep 26 '16 at 21:58













      up vote
      133
      down vote



      accepted







      up vote
      133
      down vote



      accepted






      The best way to do this is to click the "share" checkmark next to Name field when you edit/create the configuration. You can get to this Dialog with Run > Edit Configurations.



      enter image description here



      The share check-mark pulls the setting out of your workspace.xml and instead puts it in the directory .idearunConfigurations. This is designed so you can share the setting with others.
      You could copy this file and put it in the same location in all your idea projects.



      However, in the future, you might want to consider using source control branches for app versions rather than separate projects. IntelliJ handles these very well.






      share|improve this answer












      The best way to do this is to click the "share" checkmark next to Name field when you edit/create the configuration. You can get to this Dialog with Run > Edit Configurations.



      enter image description here



      The share check-mark pulls the setting out of your workspace.xml and instead puts it in the directory .idearunConfigurations. This is designed so you can share the setting with others.
      You could copy this file and put it in the same location in all your idea projects.



      However, in the future, you might want to consider using source control branches for app versions rather than separate projects. IntelliJ handles these very well.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Jul 8 '14 at 22:03









      Nick Humrich

      7,88353769




      7,88353769








      • 1




        "you might want to consider using source control branches for app versions rather than separate projects" How does that work? I'm concerned that 20x source files will make Intellij run slower. Does it only consider one at a time?
        – Daniel Kaplan
        Jul 8 '14 at 22:12






      • 2




        @tieTYT Yes. How a source control branch works is that it edits all your local files to match the branch. Then you switch branches, it does it again. You end up having less space used in your local file system. Heres a good read for you: git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging
        – Nick Humrich
        Jul 8 '14 at 22:14








      • 2




        @tieTYT Basically, you only have one branch existing on your local machine at a time. When you want to work on another version, the source control changes it to that version for you. You wont have "20x source files" because you only have 1x at a time.
        – Nick Humrich
        Jul 8 '14 at 22:15












      • Ah, well at work we use SVN. That being said I am using the Git-SVN bridge locally. I have never switched to a different SVN branch from it though. I guess I'll give it a shot.
        – Daniel Kaplan
        Jul 8 '14 at 22:20






      • 2




        @jay you could always add the file to no be excluded in your .gitignore. !.idea/runConfidurations/name
        – Nick Humrich
        Sep 26 '16 at 21:58














      • 1




        "you might want to consider using source control branches for app versions rather than separate projects" How does that work? I'm concerned that 20x source files will make Intellij run slower. Does it only consider one at a time?
        – Daniel Kaplan
        Jul 8 '14 at 22:12






      • 2




        @tieTYT Yes. How a source control branch works is that it edits all your local files to match the branch. Then you switch branches, it does it again. You end up having less space used in your local file system. Heres a good read for you: git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging
        – Nick Humrich
        Jul 8 '14 at 22:14








      • 2




        @tieTYT Basically, you only have one branch existing on your local machine at a time. When you want to work on another version, the source control changes it to that version for you. You wont have "20x source files" because you only have 1x at a time.
        – Nick Humrich
        Jul 8 '14 at 22:15












      • Ah, well at work we use SVN. That being said I am using the Git-SVN bridge locally. I have never switched to a different SVN branch from it though. I guess I'll give it a shot.
        – Daniel Kaplan
        Jul 8 '14 at 22:20






      • 2




        @jay you could always add the file to no be excluded in your .gitignore. !.idea/runConfidurations/name
        – Nick Humrich
        Sep 26 '16 at 21:58








      1




      1




      "you might want to consider using source control branches for app versions rather than separate projects" How does that work? I'm concerned that 20x source files will make Intellij run slower. Does it only consider one at a time?
      – Daniel Kaplan
      Jul 8 '14 at 22:12




      "you might want to consider using source control branches for app versions rather than separate projects" How does that work? I'm concerned that 20x source files will make Intellij run slower. Does it only consider one at a time?
      – Daniel Kaplan
      Jul 8 '14 at 22:12




      2




      2




      @tieTYT Yes. How a source control branch works is that it edits all your local files to match the branch. Then you switch branches, it does it again. You end up having less space used in your local file system. Heres a good read for you: git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging
      – Nick Humrich
      Jul 8 '14 at 22:14






      @tieTYT Yes. How a source control branch works is that it edits all your local files to match the branch. Then you switch branches, it does it again. You end up having less space used in your local file system. Heres a good read for you: git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging
      – Nick Humrich
      Jul 8 '14 at 22:14






      2




      2




      @tieTYT Basically, you only have one branch existing on your local machine at a time. When you want to work on another version, the source control changes it to that version for you. You wont have "20x source files" because you only have 1x at a time.
      – Nick Humrich
      Jul 8 '14 at 22:15






      @tieTYT Basically, you only have one branch existing on your local machine at a time. When you want to work on another version, the source control changes it to that version for you. You wont have "20x source files" because you only have 1x at a time.
      – Nick Humrich
      Jul 8 '14 at 22:15














      Ah, well at work we use SVN. That being said I am using the Git-SVN bridge locally. I have never switched to a different SVN branch from it though. I guess I'll give it a shot.
      – Daniel Kaplan
      Jul 8 '14 at 22:20




      Ah, well at work we use SVN. That being said I am using the Git-SVN bridge locally. I have never switched to a different SVN branch from it though. I guess I'll give it a shot.
      – Daniel Kaplan
      Jul 8 '14 at 22:20




      2




      2




      @jay you could always add the file to no be excluded in your .gitignore. !.idea/runConfidurations/name
      – Nick Humrich
      Sep 26 '16 at 21:58




      @jay you could always add the file to no be excluded in your .gitignore. !.idea/runConfidurations/name
      – Nick Humrich
      Sep 26 '16 at 21:58












      up vote
      13
      down vote













      goto



      Run > Edit Configuration > create or select existing configuration you want to use > click save and persist it on file system > click on share check mark


      now copy this file from



       PROJECT_ROOT_DIRECTORY/.idea/runConfigurations/ConfigurationName.xml


      to your NEW_PROJECT_ROOT_DIRECTORY/.idea/runConfigurations at the same place and it is available now to your run configuration






      share|improve this answer























      • I think you have to check Share first like Humdinger said
        – Daniel Kaplan
        Jul 8 '14 at 22:09










      • yes fixed it <!-->
        – Jigar Joshi
        Jul 8 '14 at 22:10

















      up vote
      13
      down vote













      goto



      Run > Edit Configuration > create or select existing configuration you want to use > click save and persist it on file system > click on share check mark


      now copy this file from



       PROJECT_ROOT_DIRECTORY/.idea/runConfigurations/ConfigurationName.xml


      to your NEW_PROJECT_ROOT_DIRECTORY/.idea/runConfigurations at the same place and it is available now to your run configuration






      share|improve this answer























      • I think you have to check Share first like Humdinger said
        – Daniel Kaplan
        Jul 8 '14 at 22:09










      • yes fixed it <!-->
        – Jigar Joshi
        Jul 8 '14 at 22:10















      up vote
      13
      down vote










      up vote
      13
      down vote









      goto



      Run > Edit Configuration > create or select existing configuration you want to use > click save and persist it on file system > click on share check mark


      now copy this file from



       PROJECT_ROOT_DIRECTORY/.idea/runConfigurations/ConfigurationName.xml


      to your NEW_PROJECT_ROOT_DIRECTORY/.idea/runConfigurations at the same place and it is available now to your run configuration






      share|improve this answer














      goto



      Run > Edit Configuration > create or select existing configuration you want to use > click save and persist it on file system > click on share check mark


      now copy this file from



       PROJECT_ROOT_DIRECTORY/.idea/runConfigurations/ConfigurationName.xml


      to your NEW_PROJECT_ROOT_DIRECTORY/.idea/runConfigurations at the same place and it is available now to your run configuration







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Jul 8 '14 at 22:10

























      answered Jul 8 '14 at 22:04









      Jigar Joshi

      197k35334387




      197k35334387












      • I think you have to check Share first like Humdinger said
        – Daniel Kaplan
        Jul 8 '14 at 22:09










      • yes fixed it <!-->
        – Jigar Joshi
        Jul 8 '14 at 22:10




















      • I think you have to check Share first like Humdinger said
        – Daniel Kaplan
        Jul 8 '14 at 22:09










      • yes fixed it <!-->
        – Jigar Joshi
        Jul 8 '14 at 22:10


















      I think you have to check Share first like Humdinger said
      – Daniel Kaplan
      Jul 8 '14 at 22:09




      I think you have to check Share first like Humdinger said
      – Daniel Kaplan
      Jul 8 '14 at 22:09












      yes fixed it <!-->
      – Jigar Joshi
      Jul 8 '14 at 22:10






      yes fixed it <!-->
      – Jigar Joshi
      Jul 8 '14 at 22:10












      up vote
      12
      down vote













      Run configurations are stored in .idea/workspace.xml by default. First alternative is to share this file but it is not feasible because you also share a lot of unnecessary configurations.
      As already said, the first step is to check "share" option to separate run configurations from workspace.xml.



      dispatching run configurations from workspace.xml



      After that, I recommend adding runConfigurations to source control. But the main problem is, probably you have already marked .idea folder as ignored.
      You can unignore the folder by configuring your source control system. For example, if you are using git, you can change .gitignore file as follows:



      .idea/*
      !/.idea/runConfigurations


      don't forget adding * after .idea/



      As the last step, add your run configurations to source control and enjoy your shared configurations!






      share|improve this answer

























        up vote
        12
        down vote













        Run configurations are stored in .idea/workspace.xml by default. First alternative is to share this file but it is not feasible because you also share a lot of unnecessary configurations.
        As already said, the first step is to check "share" option to separate run configurations from workspace.xml.



        dispatching run configurations from workspace.xml



        After that, I recommend adding runConfigurations to source control. But the main problem is, probably you have already marked .idea folder as ignored.
        You can unignore the folder by configuring your source control system. For example, if you are using git, you can change .gitignore file as follows:



        .idea/*
        !/.idea/runConfigurations


        don't forget adding * after .idea/



        As the last step, add your run configurations to source control and enjoy your shared configurations!






        share|improve this answer























          up vote
          12
          down vote










          up vote
          12
          down vote









          Run configurations are stored in .idea/workspace.xml by default. First alternative is to share this file but it is not feasible because you also share a lot of unnecessary configurations.
          As already said, the first step is to check "share" option to separate run configurations from workspace.xml.



          dispatching run configurations from workspace.xml



          After that, I recommend adding runConfigurations to source control. But the main problem is, probably you have already marked .idea folder as ignored.
          You can unignore the folder by configuring your source control system. For example, if you are using git, you can change .gitignore file as follows:



          .idea/*
          !/.idea/runConfigurations


          don't forget adding * after .idea/



          As the last step, add your run configurations to source control and enjoy your shared configurations!






          share|improve this answer












          Run configurations are stored in .idea/workspace.xml by default. First alternative is to share this file but it is not feasible because you also share a lot of unnecessary configurations.
          As already said, the first step is to check "share" option to separate run configurations from workspace.xml.



          dispatching run configurations from workspace.xml



          After that, I recommend adding runConfigurations to source control. But the main problem is, probably you have already marked .idea folder as ignored.
          You can unignore the folder by configuring your source control system. For example, if you are using git, you can change .gitignore file as follows:



          .idea/*
          !/.idea/runConfigurations


          don't forget adding * after .idea/



          As the last step, add your run configurations to source control and enjoy your shared configurations!







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Sep 5 '17 at 15:08









          Turgay Celik

          14916




          14916






















              up vote
              10
              down vote













              You should copy the folder



              ~/your-old-project/.idea/runConfigurations 


              to



              ~/your-new-project/.idea/


              That's the folder that contains the run configurations.






              share|improve this answer

















              • 4




                I believe you need to set them to "share" first as elaborated in the accepted answer.
                – Muhd
                May 23 '17 at 3:17















              up vote
              10
              down vote













              You should copy the folder



              ~/your-old-project/.idea/runConfigurations 


              to



              ~/your-new-project/.idea/


              That's the folder that contains the run configurations.






              share|improve this answer

















              • 4




                I believe you need to set them to "share" first as elaborated in the accepted answer.
                – Muhd
                May 23 '17 at 3:17













              up vote
              10
              down vote










              up vote
              10
              down vote









              You should copy the folder



              ~/your-old-project/.idea/runConfigurations 


              to



              ~/your-new-project/.idea/


              That's the folder that contains the run configurations.






              share|improve this answer












              You should copy the folder



              ~/your-old-project/.idea/runConfigurations 


              to



              ~/your-new-project/.idea/


              That's the folder that contains the run configurations.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Sep 2 '16 at 19:12









              de.la.ru

              1,4451325




              1,4451325








              • 4




                I believe you need to set them to "share" first as elaborated in the accepted answer.
                – Muhd
                May 23 '17 at 3:17














              • 4




                I believe you need to set them to "share" first as elaborated in the accepted answer.
                – Muhd
                May 23 '17 at 3:17








              4




              4




              I believe you need to set them to "share" first as elaborated in the accepted answer.
              – Muhd
              May 23 '17 at 3:17




              I believe you need to set them to "share" first as elaborated in the accepted answer.
              – Muhd
              May 23 '17 at 3:17










              up vote
              0
              down vote













              This is not exactly an answer to your question but it answers a question similar to your question and one that I had, and I'm assuming others might as well.



              That is, How to save unit and instrumentation test run configurations? I usually right-click on the test directory which brings up a menu with the option to Run whatever is in that directory. AndroidStudio then creates a run configuration on the fly and in the Run Configuration drop-down menu a new option will appear, "Save new configuration?" or something similar.



              Clicking that option brings up the Run Configuration menu and at that point I check the Share box as many others have already mentioned. This then will prompt the version control system to ask me if I want to add this new run configuration file. If you haven't registered your version control system you can find the new files under .idea/runConfigurations.






              share|improve this answer

























                up vote
                0
                down vote













                This is not exactly an answer to your question but it answers a question similar to your question and one that I had, and I'm assuming others might as well.



                That is, How to save unit and instrumentation test run configurations? I usually right-click on the test directory which brings up a menu with the option to Run whatever is in that directory. AndroidStudio then creates a run configuration on the fly and in the Run Configuration drop-down menu a new option will appear, "Save new configuration?" or something similar.



                Clicking that option brings up the Run Configuration menu and at that point I check the Share box as many others have already mentioned. This then will prompt the version control system to ask me if I want to add this new run configuration file. If you haven't registered your version control system you can find the new files under .idea/runConfigurations.






                share|improve this answer























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  This is not exactly an answer to your question but it answers a question similar to your question and one that I had, and I'm assuming others might as well.



                  That is, How to save unit and instrumentation test run configurations? I usually right-click on the test directory which brings up a menu with the option to Run whatever is in that directory. AndroidStudio then creates a run configuration on the fly and in the Run Configuration drop-down menu a new option will appear, "Save new configuration?" or something similar.



                  Clicking that option brings up the Run Configuration menu and at that point I check the Share box as many others have already mentioned. This then will prompt the version control system to ask me if I want to add this new run configuration file. If you haven't registered your version control system you can find the new files under .idea/runConfigurations.






                  share|improve this answer












                  This is not exactly an answer to your question but it answers a question similar to your question and one that I had, and I'm assuming others might as well.



                  That is, How to save unit and instrumentation test run configurations? I usually right-click on the test directory which brings up a menu with the option to Run whatever is in that directory. AndroidStudio then creates a run configuration on the fly and in the Run Configuration drop-down menu a new option will appear, "Save new configuration?" or something similar.



                  Clicking that option brings up the Run Configuration menu and at that point I check the Share box as many others have already mentioned. This then will prompt the version control system to ask me if I want to add this new run configuration file. If you haven't registered your version control system you can find the new files under .idea/runConfigurations.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Sep 5 '17 at 17:57









                  jwehrle

                  39657




                  39657






























                       

                      draft saved


                      draft discarded



















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f24642147%2fhow-do-i-share-intellij-run-debug-configurations-between-projects%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      這個網誌中的熱門文章

                      Xamarin.form Move up view when keyboard appear

                      Post-Redirect-Get with Spring WebFlux and Thymeleaf

                      Anylogic : not able to use stopDelay()