IntelliJ IDEA 2016.2 Help

Working with Scala Console

IntelliJ IDEA lets you run Scala Console to quickly evaluate an expression or a code selection.

Running Scala Console

  • Right-click on your Scala object and select Run Scala Console from the drop-down list.

    The Scala Console window opens.


Evaluating Code in Scala Console

  1. Type an expression in the console and evaluate it. You can also evaluate a code selection by sending it from the editor to the Scala console.
  2. To see the result of the typed expression, press Ctrl+ Enter.
  3. To send the code selection to Scala Console, select the code in the editor, press Ctrl+ Shift+ X (for Windows) or Meta+ Shift+ X (for Mac). Alternatively, right-click on the code selection and from the context menu select Send Selection To Scala Console to get the same result. Now, you can view the selected code and its evaluation in the console.

Using Toolbars in Scala Console

  • You can use Run toolbar and Console toolbar options to rerun, stop, pause, or terminate the Scala console.

See Also

Last modified: 23 November 2016