# Decompile and see the bytecode of Scala code

> **TL;DR**
> Required plugin: Scala: [how to install](get-started-with-scala.html#scala_plugin)

IntelliJ IDEA allows you to decompile the bytecode produced by the Scala compiler to Java and to examine the bytecode directly.

Procedure: 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.

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) to open settings and then select `Plugins`.

2. Open the Installed tab, find the Java Bytecode Decompiler and Bytecode Viewer plugins, and click Enable. Restart the IDE if prompted.

Procedure: Show decompiled class as Java

1. Build your project by clicking `Build | Build Project` in the main menu or by pressing `Ctrl+F9` (Windows), `⌘ F9` (macOS), `⌘ F9` (IntelliJ IDEA Classic (macOS)), `⌘ ⌃ B` (macOS System Shortcuts), `Ctrl+F9` (XWin), `Ctrl+F9` (GNOME), `Ctrl+9` (KDE), `Ctrl+F9` (Emacs), `Ctrl+F9` (Sublime Text), `Ctrl+F9` (Sublime Text (macOS)), `F11` (NetBeans), `F7` (Visual Studio), `F7` (Visual Studio (macOS)), `Ctrl+F9` (Eclipse), `⌘ B` (Eclipse (macOS)). Alternatively, run the project by pressing `Shift+F10` (Windows), `⌃ R` (macOS), `⇧ F10` (IntelliJ IDEA Classic (macOS)), `⌥ ⇧ R` (macOS System Shortcuts), `Shift+F10` (XWin), `Shift+F10` (GNOME), `Shift+F10` (KDE), `Shift+F10` (Emacs), `Shift+F10` (Sublime Text), `Shift+F10` (Sublime Text (macOS)), `F6` (NetBeans), `Ctrl+F5` (Visual Studio), `⌃ F5` (Visual Studio (macOS)), `Alt+Shift+X` (Eclipse), `⌘ ⇧ F11` (Eclipse (macOS)).

2. In the Project tool window (`Alt+1` (Windows), `⌘ 1` (macOS), `⌘ 1` (IntelliJ IDEA Classic (macOS)), `⌘ 1` (macOS System Shortcuts), `Alt+1` (XWin), `Alt+1` (GNOME), `Alt+1` (KDE), `Alt+1` (Emacs), `Alt+1` (Sublime Text), `⌘ 1` (Sublime Text (macOS)), `Ctrl+1` (NetBeans), `Ctrl+Alt+L` (Visual Studio), `⌘ ⌥ L` (Visual Studio (macOS)), `Alt+1` (Eclipse), `Alt+1` (Eclipse (macOS))), open the `target` folder, right-click the `.class` file you want to decompile, and select Show Decompiled Class As Java.

3. The decompiled code will show up in the editor.

![Show Decompiled Class As Java](https://resources.jetbrains.com.cn/help/img/idea/2026.2/scala_decompileasjava.png)

Learn more from the [Java Bytecode Decompiler](decompiler.html) page.

Procedure: Show bytecode

1. Build your project by clicking `Build | Build Project` in the main menu or by pressing `Ctrl+F9` (Windows), `⌘ F9` (macOS), `⌘ F9` (IntelliJ IDEA Classic (macOS)), `⌘ ⌃ B` (macOS System Shortcuts), `Ctrl+F9` (XWin), `Ctrl+F9` (GNOME), `Ctrl+9` (KDE), `Ctrl+F9` (Emacs), `Ctrl+F9` (Sublime Text), `Ctrl+F9` (Sublime Text (macOS)), `F11` (NetBeans), `F7` (Visual Studio), `F7` (Visual Studio (macOS)), `Ctrl+F9` (Eclipse), `⌘ B` (Eclipse (macOS)). Alternatively, run the project by pressing `Shift+F10` (Windows), `⌃ R` (macOS), `⇧ F10` (IntelliJ IDEA Classic (macOS)), `⌥ ⇧ R` (macOS System Shortcuts), `Shift+F10` (XWin), `Shift+F10` (GNOME), `Shift+F10` (KDE), `Shift+F10` (Emacs), `Shift+F10` (Sublime Text), `Shift+F10` (Sublime Text (macOS)), `F6` (NetBeans), `Ctrl+F5` (Visual Studio), `⌃ F5` (Visual Studio (macOS)), `Alt+Shift+X` (Eclipse), `⌘ ⇧ F11` (Eclipse (macOS)).

2. In the Project tool window (`Alt+1` (Windows), `⌘ 1` (macOS), `⌘ 1` (IntelliJ IDEA Classic (macOS)), `⌘ 1` (macOS System Shortcuts), `Alt+1` (XWin), `Alt+1` (GNOME), `Alt+1` (KDE), `Alt+1` (Emacs), `Alt+1` (Sublime Text), `⌘ 1` (Sublime Text (macOS)), `Ctrl+1` (NetBeans), `Ctrl+Alt+L` (Visual Studio), `⌘ ⌥ L` (Visual Studio (macOS)), `Alt+1` (Eclipse), `Alt+1` (Eclipse (macOS))), select a class, case class, object, case object, or an enum file.

3. In the main menu, go to `View | Show Bytecode`. IntelliJ IDEA will display a dialog with the bytecode.

![Show Bytecode](https://resources.jetbrains.com.cn/help/img/idea/2026.2/scala_bytecode_viewer.png)

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](bytecode-viewer.html).

## See also

### Related

[Java Bytecode Decompiler](decompiler.html) [Project tool window](project-tool-window.html)

