title: Side Effects of running the JVM in debug mode
body: <p>I'd like to realease a Java application in debug mode to allow for easier debugging when random or hard to reproduce problems occur on the customer side.</p>
  
  <p>However, I want to get a heads up on potential side effects of doing this? From the Java HotSpot Documentation it seems that there <a href="http://java.sun.com/products/hotspot/docs/whitepaper/Java_Hotspot_v1.4.1/Java_HSpot_WP_v1.4.1_1002_3.html" rel="nofollow noreferrer">should be no performance penalty</a>. </p>
  
  <p>From the link</p>
  
  <blockquote>
    <p><strong>Full Speed Debugging</strong></p>
    
    <p>The Java HotSpot VM now uses
    full-speed debugging. In previous
    version of the VM, when debugging was
    enabled, the program executed using
    only the interpreter. Now, the full
    performance advantage of HotSpot
    technology is available to programs,
    even with compiled code. The improved
    performance allows long-running
    programs to be more easily debugged.
    It also allows testing to proceed at
    full speed. Once there is an
    exception, the debugger launches with
    full visibility to code sources.</p>
  </blockquote>
  
  <p>Is this accurate or are there hidden caveats, what about memory footprint and are there any other hidden gotchas while using debug mode.</p>
  
  <p>PS: I found <a href="https://web.archive.org/web/20120621173832/http://developer.amd.com/documentation/articles/pages/Java-Performance-Debugging-Enabled.aspx" rel="nofollow noreferrer">this article</a> from AMD which confirmed my initial suspiciion that the original article from oricale doesn't show the full story.</p>