title: JVM remote debugging session terminating on uncaught exception
body: <p>I'm attempting to debug a scala project remotely. Both the executing program (built and executed from SBT) and my debugger (Intellij) are local, but since I don't want to build using Intellij, using a remote debugging session seemed the easiest option for convenient debugging.</p>
  
  <p>The program is started with the following options:</p>
  
  <pre><code>-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
  </code></pre>
  
  <p>It's successfully suspending on launch, and I can successfully attach my debugger. I can set break points and step through the code, but the problem is that an uncaught exception terminates the debugging session and disconnects the debugger, defeating the purpose of debugging. This being the default behaviour would be asburd, so I have to be doing something wrong.</p>
  
  <p>Intellij's Console reads:</p>
  
  <pre><code>Connected to the target VM, address: 'localhost:5005', transport: 'socket'
  Disconnected from the target VM, address: 'localhost:5005', transport: 'socket'
  </code></pre>
  
  <p>Is there something I'm missing on either the execution or debugging side of things?</p>
  
  <p>Edit: adding a stack trace where I'm throwing new Exception("what") in the main of my class:</p>
  
  <pre><code>[error] java.lang.Exception: what
  [error]     at travellr.application.prophet.Prophet$.main(Prophet.scala:80)
  [error]     at travellr.application.prophet.Prophet.main(Prophet.scala)
  [error]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  [error]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  [error]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  [error]     at java.lang.reflect.Method.invoke(Method.java:597)
  [error]     at scala.tools.nsc.util.ScalaClassLoader$$anonfun$run$1.apply(ScalaClassLoader.scala:81)
  [error]     at scala.tools.nsc.util.ScalaClassLoader$class.asContext(ScalaClassLoader.scala:24)
  [error]     at scala.tools.nsc.util.ScalaClassLoader$URLClassLoader.asContext(ScalaClassLoader.scala:86)
  [error]     at scala.tools.nsc.util.ScalaClassLoader$class.run(ScalaClassLoader.scala:81)
  [error]     at scala.tools.nsc.util.ScalaClassLoader$URLClassLoader.run(ScalaClassLoader.scala:86)
  [error]     at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:83)
  [error]     at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
  </code></pre>