SBT console to debug application

Reading Time: 2 minutes

In this blog post, We will know how to debug application via sbt console. Suppose we want to do some initialization process before debugging the application. For example, database connection, importing packages etc. sbt configuration provide a nice way to make debug process easier.

There are some steps to debug Liftweb application via sbt console. First we have to initialize the database connection or initialize application before debugging. For that we have to run class Boot’s function boot.

Now we don’t want to import packages or database connection initialization manually so sbt configuration setting Define the initial commands evaluated when entering the Scala REPL. Just define initial commands in build.sbt

now again run the REPL:

Now There is no need to run initialization process manually once you define initialCommands in build.sbt.