title: Debug Spark worker thread using IntelliJ or Get the function trace of worker
body: <p>I am trying to debug a spark application using IntelliJ. 
  I can debug the driver part (or till the execution is running on the driver), but once, it's moved on the worker, I am not able to debug it. 
  I get the result from worker through Listener, but don't get any window to debug the worker. </p>
  
  <p>I have tried the both ways. First, by running the spark application in IntelliJ IDE and then debug and second, by running the application using "spark-submit" and then using the remote debug. </p>
  
  <p>I am running it locally. Below is the spark submit command: </p>
  
  <pre><code>spark-submit --verbose --master "local" --class "Test" target/scala-2.11/test-assembly-1.0.jar 
  </code></pre>
  
  <p>I have also seen the threads mentioned in the answer of a similar <a href="http://apache-spark-user-list.1001560.n3.nabble.com/Debugging-spark-java-application-td19270.html#a19284" rel="nofollow">question</a> in apache-spark users list. 
  But it didn't work out for me. </p>
  
  <p>I basically want to see the function trace of worker here. So if there's any way that I can  get the function trace, that will also work for me. </p>
  
  <p>So could someone here suggest me anyway for debugging the worker or getting the function trace of the worker? </p>
  
  <p>Thanks, </p>