Search code examples
debuggingsbt-plugin

debug sbt plugin in intellij with its source code checked out


Sbt project that is using some library can have a build.sbt file as mentioned below :-

name := "DependencyExample"

libraryDependencies += "organization" %% "name" % "version"

lazy val sampleProject = (project in file("."))

Now, if a developer wants to understand the flow of library by adding some debug statements.

Then above build.sbt can be updated as :-

name := "DependencyExample"

lazy val dependencyProject = ProjectRef( "path/to/depndency/src/on/local/machine", "dependencyProject")

lazy val sampleProject = (project in file(".")).dependsOn(dependencyProject)

What will be the steps, if a developer wants to understand the flow of a Sbt Plugin by adding some debug statements?


Solution

  • Similar steps will be required for debugging and sbt plugin. In addition to that one should also mention dependency in plugins.sbt also.