Run From Keyboard

Use the keyboard to select and run a run configuration.

Paul Everitt

Paul Everitt

editing  

These tips have a recurring theme: use your keyboard, not your mouse. Running your code should be the same way.

Use the Run action ⌃⌥R (macOS) / Shift+Alt+F10 (Windows/Linux) to get a popup listing your defined run configurations, both permanent and temporary. You can then use the arrow keys or speed-type to highlight the one you want to run, pressing (macOS) / Enter (Windows/Linux) to select and execute it.

"Select" is used intentionally: one you select this run configuration, it is the active one, and the simpler Run action ⌃⌥R (macOS) / Shift+Alt+F10 (Windows/Linux) will immediately run it.

You can do more from the keyboard than just run it. Each entry in the popup has a submenu which you can access by pressing the right arrow. This lets you choose how you want to run it (Run, Debug, Coverage, Profile, Run under the concurrency diagram, etc.) as well as edit that configuration or delete it.

Debugging is popular option, so it gets its own popup sequence. Use the Debug action ⌥⌘R (macOS) / F9 (Windows/Linux) to give the popup, but leading directly to debugging (to skip the submenu step.) Once selected, you can re-run that debug configuration with the Debug action ⌃D (macOS) / Shift+F9 (Windows/Linux).

Again, for both the run popup and debug popup, don't forget to speed type to select, instead of the arrow keys.

There are, obviously, many other ways to run your code (menus, right click, gutter icons, tool window buttons.) For keyboard-centric folks, give this a try.

See Also

Related Resources

Clean Up Messy Imports With Optimize Imports
Clean Up Messy Imports With Optimize Imports
Quickly remove any unused imports and more.
Find in Path with the Navigation Bar
Find in Path with the Navigation Bar
Use the Navigation bar and Find in File together and be faster than all of your team members.
Speed search with the Navigation Bar
Speed search with the Navigation Bar
Use the keyboard abbreviations to quickly find what you're looking for in the Navigation bar.