Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to export and import Run/Debug configurations in PHPStorm?

Tags:

phpstorm

I have a lot of similar projects created in PHPStorm and I need the same Run/Debug configuration in all my projects. Right now the Run/Debug configuration is empty when I create a new project.

I have tried exporting and importing settings from the file menu but that does not copy the Run/Debug configuration of project A into project B.

Can someone please tell me how to copy the Run/Debug configuration of one project into another?

like image 496
supersan Avatar asked May 20 '15 12:05

supersan


People also ask

How do I save a configuration in PyCharm?

Save a temporary configuration as permanent Select a temporary configuration in the run/debug configuration switcher and then click Save Configuration. Once you save a temporary configuration, it becomes permanent and it is recorded in a separate XML file in the <project directory>/. idea/ directory.

How do I import IntelliJ run configurations?

How to import the xml in a new project? Open Left Project Pane -> Copy . run folder -> open another project without closing intellij -> Paste on main project level. Your previously saved run config appears here.

Where is run debug configuration in IntelliJ?

From the main menu, select Run | Edit Configurations. Alternatively, press Alt+Shift+F10 , then 0 . on the toolbar or press Alt+Insert . The list shows the run/debug configuration templates.

Where are run configurations stored in IntelliJ?

By default, it is disabled, and IntelliJ IDEA stores run configuration settings in . idea/workspace. xml.


1 Answers

Run/Debug Configurations are project-specific and therefore cannot be exported/imported via File | Export/Import Settings... which is for IDE-wide settings only.


By default, all Run/Debug configurations are stored in YourProject/.idea/workspace.xml file together with other developer-specific settings.

In order to be able to share (better say -- copy) between the projects:

  1. Make sure that each of such Run/Debug configurations has "Shared" box ticked.

  2. Such shared run configurations will be stored in separate *.xml files in YourProject/.idea/runConfigurations/ folder which you can include in VCS if necessary.

  3. You can copy these files from one project to another (while project is closed in IDE, of course).

like image 189
LazyOne Avatar answered Sep 20 '22 18:09

LazyOne