Table of Contents [expand]
Last updated February 26, 2026
Running an sbt console in the same environment you deploy to is useful for debugging production issues. This guide shows how to start a remote Scala REPL on Heroku.
This guide assumes you have a working Scala or Play application running on Heroku. If you don’t, create one by following the getting started guide.
Run a Remote sbt Console
The Scala buildpack includes sbt and its dependencies in your slug by default, so you can run sbt remotely using the Heroku CLI’s run command:
$ heroku run sbt console --app example-app
Running sbt console on ⬢ example-app... up, run.1
...
scala>
This starts a one-off dyno with a Scala REPL attached to your terminal. You have access to your application’s classes and dependencies.
Press Ctrl+C to exit the console and stop the dyno.
If you’ve disabled sbt at runtime by setting the SBT_AT_RUNTIME config var to false, sbt won’t be available on the dyno and this command won’t work.
For more information on using the Scala console, see the Scala REPL documentation.