Decompile and see the bytecode of Scala code
IntelliJ IDEA allows you to decompile the bytecode produced by the Scala compiler to Java and to examine the bytecode directly.
Install the required plugins
This functionality relies on the Java Bytecode Decompiler and and Bytecode Viewer plugins, which are bundled and enabled in IntelliJ IDEA by default.
If the relevant features are not available, make sure that you did not disable the plugins.
Press Ctrl+Alt+S to open settings and then select
.Open the Installed tab, find the Java Bytecode Decompiler and Bytecode Viewer plugins, and click Enable. Restart the IDE if prompted.
Show decompiled class as Java
Build your project by clicking
in the main menu or by pressing Ctrl+F9. Alternatively, run the project by pressing Shift+F10.In the Project tool window (Alt+1), open the target folder, right-click the
.class
file you want to decompile, and select Show Decompiled Class As Java.The decompiled code will show up in the editor.

Learn more from the Java Bytecode Decompiler page.
Show bytecode
Build your project by clicking
in the main menu or by pressing Ctrl+F9. Alternatively, run the project by pressing Shift+F10.In the Project tool window (Alt+1), select a class, case class, object, case object, or an enum file.
In the main menu, go to
. IntelliJ IDEA will display a dialog with the bytecode.

There are limitations to what the decompiler can do:
The bytecode you want to see should exist: the project should be compiled successfully, and the file you selected should be in use, as the compiler sometimes ignores dead code during compilation.
The file you selected should contain one and only one class, case class, and so on.
The decompiler will not display the bytecode for the Scala file with top-level definitions.
Learn more from Show bytecode for compiled files.