Sometimes you might need to run or debug a certain class or file , without creating a dedicated run configuration. In this case, PhpStorm provides a temporary run configuration.
Temporary run/debug configuration is added to the list of available configurations and works same way as the permanent run/debug configurations. You can change its settings using the Run/Debug Configuration dialog box and optionally save it as permanent.
Creating a run/debug configuration involves specifying the URL address of the Web page to open. For temporary configurations, PhpStorm assembles this URL address automatically. To have it done properly, you need to specify the project root folder URL on the PHP page of the Settings dialog box.
- Select the desired PHP class or file in the Project tool window or open it in the editor.
- On the context menu of the selection, choose Ctrl+Shift+F10Ctrl+Shift+F10Ctrl+Shift+F10Ctrl+Shift+F10Ctrl+Shift+F10Ctrl+F9Shift+Alt+F6 or Shift+F6Ctrl+Shift+F10Control Shift RControl Shift RControl Shift R.
PhpStorm creates a temporary configuration, which appears in the Select Run/Debug Configuration drop-down list on the main toolbar when the run or debug session is over.
or . Alternatively, press
- In the Select Run/Debug Configuration drop-down list on the main toolbar, choose .
- In the Run/Debug Configuration dialog box, click the button.