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

See VCS Changed Lines In Gutter
Quickly spot which parts of your file have changed since the last commit.
Autocomplete Django Settings Strings
Use autocomplete when typing a string in the apps section of your settings file.
Split Screen Without Tabs
Get your code and tests side-by-side without resorting to tabs.