Running the current file

When I am working on a file, and press the "run" command (either from the menu or from the shift+F10 shortcut), it runs the last file that was run, and not the current one.
If I want to run the current one - I have to preess alt+shift+F10 and choose the desidred file from the list.

Is there a way to make the shift+F10 shortcut to run the CURRENT file?

0
2 comments

Hi there,

Shift+F10 (Run | Run xxx) does not necessarily run the last file -- it does run the currently selected Run/Debug Configuration (that drop down box on main tool bar, on the left to Run/Debug buttons).
screen01.png

Every Run or Debug is linked to Run/Debug Configurations (Run | Edit Configurations...) -- there are many types of them.

PhpStorm does not have simple "Run current file" button -- even when you use Alt+Shift+F10 it creates temporal Run/Debug Configuration (You can see them in Run | Edit Configurations -- they have dimmed/faded icons).

If you want to change shortcuts -- Settings | Keymap

0

don't know if this is suitable for your scenario, but for IntelliJ (e.g. with Scala plugin), there I am using "Ctrl-Shift-F10" function called "Run context configuration". This creates ad-hoc an run-configuration (if yet missing), depending on the file in the *current* editor, where the cursor resides. Precondition for thsi is a main method or similar in this source file of the current editor, to get this done. It must be able to be run of course ;)

0

Please sign in to leave a comment.