Search code examples
javaintellij-ideajava-bytecode-asm

ASM byte code view displays "// couldn't generate bytecode view, no .class file found"


In IntelliJ with the ASM Bytecode plugin installed you can select "Show Bytecode outline" in the popup menu when viewing a class file. Recently my IntelliJ (Community Version 12.1.6) started displaying:

// couldn't generate bytecode view, no .class file found

in the ASM window.

This occurs on various class files across different modules in my project. The strange thing is that I will get this message for one class; but another class in the same module and package works fine.

The entire project compiles fine and all my tests run. I cannot figure out why I get this message for one class and not another.


Solution

  • Per Andrey Breslav's comment, the correct resolution to this issue is to use the "Show Bytecode" command in the "View" menu. You must have the source file open for this command to be displayed. You must have compiled the source since the last change for the command to complete successfully.