title: Good tools for debugging VerifyError?
body: <p>I find bytecode <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/VerifyError.html" rel="noreferrer"><code>VerifyErrors</code></a> notoriously hard to debug. The JVM gives very little feedback, typically just the current class and sometimes the method.</p>
  
  <p>Some examples of errors I typically encounter when manually engineering bytecode through <a href="http://asm.ow2.org/" rel="noreferrer">ASM</a> or <a href="http://jasmin.sourceforge.net/" rel="noreferrer">Jasmin</a>:</p>
  
  <ul>
  <li><code>Stack size too large</code></li>
  <li><code>Unable to pop operand off an empty stack</code></li>
  <li><code>Falling off the end of the code</code></li>
  <li><code>Expecting to find object/array on stack</code></li>
  <li><code>Incompatible object argument for function call</code></li>
  <li><code>Inconsistent stack height 4 != 2</code></li>
  </ul>
  
  <p>(To be clear; I know what all of these <em>mean</em>, I'm interested in tools or techniques to debug the cause of them.)</p>
  
  <p><strong>My Question:</strong> Is there any tool out there that gives detailed feedback on these types of errors? I would for instance appreciate information such as</p>
  
  <ul>
  <li><code>javap</code>-like output</li>
  <li>references to line-numbers (or opcode byte offsets)</li>
  <li>operand stack information (types / depth) on each line</li>
  <li>more descriptive error messages</li>
  </ul>