Open a project
OpenIDEA opens a folder as a project. Any of these works:- On the Welcome screen, click Open and choose the folder, or drop the folder onto the window.
- Use File › Open… (
⌥⇧⌘Oon macOS). - From a terminal, run
openidea .in the folder. See Command line. - Clone a repository with Clone Repository on the Welcome screen or Git › Clone….
Trust the project
The first time you open a folder, OpenIDEA asks Trust and Open Project? Opening, building or running a project can execute code from its build scripts, so only trust sources you know.- Trust Project opens it with everything enabled. Check Trust projects in to trust every project in the parent folder too.
- Preview in Restricted Mode opens it read-only for tools: you can browse, edit and search files, but language servers, builds, run configurations and other project commands don’t start. A banner shows Restricted Mode; click Trust Project there when you’re ready.
- Don’t Open cancels.
Let it index
After the project opens, the status bar shows an Indexing task with the number of files and symbols. Navigation by symbol and code insight need the index, so it can’t be cancelled; on most projects it takes a few seconds. When a language needs a language server that isn’t installed, a notification names it and offers Install. Manage servers in Settings › Languages & Frameworks › Language Servers. See Languages for what each language uses.Find things
⇧⇧ means pressing Shift twice. Find Action is the fastest way to discover a feature: type a few words of what you want. For more, see Search and navigation and the full shortcut reference.
Run
OpenIDEA detects what can run in your project and shows a run icon in the gutter next to entry points and tests.- Click the gutter icon and choose Run ’…’, or put the caret in the code and press
⌃⇧R/Ctrl+Shift+F10(Run Context Configuration). - Choose a configuration in the toolbar and press
⌃R/Shift+F10to run it again. - Press
⌃⌃/Ctrl Ctrl(Run Anything…) to run a command, script or task by name. - Run › Edit Configurations… creates and edits run configurations.
⌘4 / Alt+4); ⌘F2 / Ctrl+F2 stops the process. See Run configurations.
Debug
- Click in the gutter next to a line, or press
⌘F8/Ctrl+F8, to set a breakpoint. - Start the configuration with Debug (
⌃D/Shift+F9) or the gutter icon’s Debug ’…’. - When the breakpoint hits, the Debug tool window shows frames and variables. Step with
F8(Step Over),F7(Step Into) and⇧F8/Shift+F8(Step Out); resume withF9(on macOS also⌥⌘R). - Evaluate an expression with
⌥F8/Alt+F8.
Next steps
- Coming from another IDE: Migrate.
- Change the theme, fonts or keymap: Settings, Themes and fonts, Keymaps.