title: Clean solution for dropping into REPL console in the middle of program execution
body: <p>Is there any working solution for dropping into REPL console with for Scala 2.10?</p>
  
  <p>This is mainly for debugging purpose - I want to pause in the middle of execution, and have a REPL console where I can inspect values and test the program's logic using complex expressions within my program at the current state of execution. Those who have programmed in Ruby might know similar function: the <code>binding.pry</code>.</p>
  
  <p>AFAIK, Scala 2.9 and under used to have <code>breakIf</code> but it has been removed from the later versions. Using <code>ILoop</code> seems to be the new way but introduced issues due to <code>sbt</code> not adding scala-library to the classpath.</p>
  
  <p>Several solutions such as <a href="https://stackoverflow.com/questions/16511233/scala-tools-nsc-imain-within-play-2-1">this</a> and <a href="https://stackoverflow.com/questions/6839830/how-to-set-up-classpath-for-the-scala-interpreter-in-a-managed-environment">this</a> seem to offer a good workaround but my point is there must be a solution where I don't have to spend hours or even days just to make the REPL working.</p>
  
  <p>In short, there's a lot more boilerplate steps involved - this is in contrast with <code>binding.pry</code> which is just a line of code with no additional boilerplate.</p>
  
  <p>I am not aware if there's an issue introduced in executing the program as an sbt task as opposed to if running the program executable directly, but for development purpose I am currently running and testing my program using sbt task. </p>