I've recently tried to switch from Eclipse to IntelliJ as a debugger for my university course, and I'm really enjoying the auto-completion, Chronon backwards debugging and other nice features. But there's one thing that bugs the living hell out of me: I just want to run the current file!
In Eclipse, the "Run" button was intelligent enough to simply run the current file if it contained a main method, and use the last-ran file otherwise. But in IntelliJ, just running a file is much more complicated. You have to create a Run Configuration of the right file, and then select that Run Configuration, instead of just opening the file you want. This is a big hassle for me, especially since I have many different classes with main methods in most homeworks and projects.
I found that on Macs, Ctrl + FN + Shift + F10 will "Run Context Configuration", which is almost what I'm looking for. But for some reason, this key binding doesn't have an equivalent toolbar button that switches to the context configuration and just runs it, which would solve all my problems! Can anyone help me out?
I can't find a "Run current file, otherwise selected context" action. I did find them separately.
Key binds for "Run current file":
If you hover over the Run
and Debug
buttons you'll see the shortcuts. Given you're on a Mac OS and Fn
is important to trigger F buttons here's the shortcuts:
Run: Shift
+ Fn
+ F10
Debug: Shift
+ Fn
+ F9
Years later, the simple answer: Right click inside the file and hit "Run"!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With