Bytecode Visualizer 2008

14 days trial
No source? - No problem! View and understand Java bytecode, no matter if you have the corresponding source.

Eclipse with Bytecode Visualizer showing bytecode instructions and synchronized control flow graph, example with try-catch-block

Bytecode Visualizer 2008 is an Eclipse plugin for visualizing Java byte code.
Its 4 basic components are:

Bytecode Viewer

  • Signatures of classes, fields and methods rendered as in java source
  • The opcodes in methods represented by their mnemonics as specified in The Java Virtual Machine Specification
  • Each instruction on one line
  • Comments making it easy to understand the instructions and their parameters
  • Easy-to-follow scope of exception handlers
  • Extra tab showing the source code of the class (if the source code is available)
  • Line number table as comment

Controlflow Graph Panel

The actual viewed class file can be visualized as control flow graph or basic block graph.

Example byte code with control flow graph Example byte code with basic block graph

Class Outline

The Class Outline is both ways synchronized with the Bytecode Viewer: by clicking the method in outline, the viewer scrolls to the given method and vice versa.

Eclipse with Bytecode Visualizer showing bytecode instructions and synchronized control flow graph with methods in outline

Bytecode Debugger for Instruction-by-Instruction Debugging

Do not get lost when the debugger steps into a method with no source available. Just go on with the visualized bytecode!

You have the source but a NullPointerException occured in a line with too many instructions? E.g. the line is

getModel().setPosition(getParent().getPosition());
How can you quickly tell which one of getModel() or getParent() was null without the tedious stepping into one or both of them? With Bytecode Vizualizer 2008 you can simply step over instruction-by-instruction until you see the NullPointerException.

Bytecode instruction-by-instruction debugging example

Please note that the Instruction-by-Instruction Debugger currently does not work for virtually any class. Its "step into" is possible only for classes with LineNumberTable. I.e. the classes must have been compiled with the javac's -g option.

Other Features

  • Thorough Eclipse integration
    • Opening class files (plain or from jar-archives) from Package Explorer, Navigator, stack trace of an Exception in the Console view, etc.
    • CTRL-Click into a class without source code from Java Editor

Typical Use Cases

  • Inspect the result of your own bytecode instrumentation
  • Check the efficiency of your implementation on the bytecode level
    • realize the depth of your loops by simply looking at the graph
  • If you have a third-party or legacy Java application code for which you — for whatever reason — do not have the corresponding souce code:
    • analyze the implementation details
    • identify error conditions and find bugs using our bytecode debugger