title: Attaching a Remote Debug session to Spark from Eclipse Scala IDE
body: <p>I've been wracking my brain over this for the last two days trying to get it to work. I have a local Spark installation on my Mac that I'm trying to attach a debugger to. I set:</p>
  
  <p>SPARK_JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005</p>
  
  <p>Then I submit my job to spark-submit and launch my debug configuration in eclipse which is configured as a Socket Attach Remote Debugging session. The debugger attaches, my job resumes and executes, but none of my breakpoints are ever hit, no matter what I do.</p>
  
  <p>The only way I can get it to hit a breakpoint is by attaching to a spark-shell, creating a Java Exception breakpoint and issuing</p>
  
  <pre><code>throw new java.lang.Exception()
  </code></pre>
  
  <p>The debugger will not stop at normal breakpoints for me.</p>
  
  <p>I created a standalone Hellow World scala app and was able to attach to it and have it stop at a regular breakpoint without any issues.</p>
  
  <p>Environment: Mac OS, latest Eclipse, latest Scala IDE, Spark 1.3.1, Scala 2.10.5</p>
  
  <p>Thanks in advance.</p>