Re: debugging Build.scala

182 views
Skip to first unread message

michael.j...@gmail.com

unread,
Apr 30, 2013, 11:51:24 PM4/30/13
to simple-b...@googlegroups.com
Update:  I've found that adding the sbt jars: main and ivy to the dependencies in the build project seems to be enough to get started, in that I can see a Build.scala without errors (within Scala IDE), but when I try to debug (play debug), I am not hitting the breakpoint in my task.  I've tried several variations, including setting the options in the environment, and on the build.sbt settings.  No matter what I do, I cannot figure out how to debug an SBT build.

Has anybody tried to do this?  If not, how do you develop any significant plugin or deviation from a standard build?  log output?


Josh Suereth

unread,
May 1, 2013, 7:21:59 AM5/1/13
to simple-b...@googlegroups.com

You can use the sbt eclipse plugin to generate your project definition.

In the sbt console
> reload plugins
> eclipse
> reload return

Then in eclipse, import the project/ directory.  Add the local root to your build path.

Finally, if you're using one of the launchers from the sbt site, start sbt with -jvm-debug <port> as an option.   Then connect to that port in eclipse and you can debug your build.

Finally, a word of warning.   Sbt is a parallel execution engine, so be careful where you out breakpoints.   Tasks with no dependency on each other will execute on different threads, potentially.

On Apr 30, 2013 11:51 PM, <michael.j...@gmail.com> wrote:
Update:  I've found that adding the sbt jars: main and ivy to the dependencies in the build project seems to be enough to get started, in that I can see a Build.scala without errors (within Scala IDE), but when I try to debug (play debug), I am not hitting the breakpoint in my task.  I've tried several variations, including setting the options in the environment, and on the build.sbt settings.  No matter what I do, I cannot figure out how to debug an SBT build.

Has anybody tried to do this?  If not, how do you develop any significant plugin or deviation from a standard build?  log output?


--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-build-t...@googlegroups.com.
To post to this group, send email to simple-b...@googlegroups.com.
Visit this group at http://groups.google.com/group/simple-build-tool?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages