title: Interactively execute code while debugging in Scala
body: <p>Is there a method for inserting code into a Scala application while debugging?  For example, could I have something like this,</p>
  
  <pre><code>var c = 1.0
  0.until(10).foreach{ i =&gt;
     if (i == 5) {
        startDebuggingMagicHere()
     }
  }
  </code></pre>
  
  <p>where I could then inspect and interact with <code>c</code>, <code>i</code>, and any other variable in scope via methods and assignment.</p>