title: Debugging JBehave scenarios
body: <p>I'm having trouble debugging my jbehave tests.  I cannot get maven to start the jbehave tests and stop at a breakpoint.  I have this in my pom:</p>
  
  <pre><code>&lt;pluginManagement&gt;
   &lt;plugins&gt;
     &lt;plugin&gt;
       &lt;groupId&gt;org.jbehave&lt;/groupId&gt;
       &lt;artifactId&gt;jbehave-maven-plugin&lt;/artifactId&gt;
       &lt;version&gt;2.0.1&lt;/version&gt;
     &lt;/plugin&gt;
   &lt;/plugins&gt;
  &lt;/pluginManagement&gt;
  &lt;plugins&gt;
   &lt;plugin&gt;
     &lt;groupId&gt;org.jbehave&lt;/groupId&gt;
     &lt;artifactId&gt;jbehave-maven-plugin&lt;/artifactId&gt;
     &lt;executions&gt;
       &lt;execution&gt;
         &lt;id&gt;run-scenarios-found&lt;/id&gt;
         &lt;phase&gt;test&lt;/phase&gt;
         &lt;configuration&gt;
           &lt;scenarioIncludes&gt;
             &lt;scenarioInclude&gt;**/scenario/**/*${test}.java&lt;/scenarioInclude&gt;
           &lt;/scenarioIncludes&gt;
           &lt;scenarioExcludes&gt;
             &lt;scenarioExclude&gt;**/*Steps.java&lt;/scenarioExclude&gt;
           &lt;/scenarioExcludes&gt;
         &lt;/configuration&gt;
         &lt;goals&gt;
           &lt;goal&gt;run-scenarios&lt;/goal&gt;
         &lt;/goals&gt;
       &lt;/execution&gt;
     &lt;/executions&gt;
   &lt;/plugin&gt;
  &lt;/plugins&gt;
  </code></pre>
  
  <p>and I have tried things like:</p>
  
  <pre><code>$  mvn -e -o -Dtest=MyTest -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8787 -Xnoagent -Djava.compiler=NONE" clean test
  </code></pre>
  
  <p>and</p>
  
  <pre><code>$ export MVN_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8787 -Xnoagent -Djava.compiler=NONE" ; mvn -Dtest=MyTest clean test 
  </code></pre>
  
  <p>I can try to use <a href="http://java.sun.com/javase/6/docs/technotes/tools/share/jsadebugd.html" rel="nofollow noreferrer">jsadebugd</a>, but I that will probably require immaculate timing to automate, so that sounds like a suboptimal solution, and I feel like the JBehave Maven plugin should provide this functionality.  Clearly I have just not found the right piece of documetation yet.  Any ideas how I go about this ?</p>