Debugging a Scala project (IntelliJ Idea 12 and sbt)

debugging, sbt, scala

Solution

IMO, you are best off keeping SBT and Intellij separate, as they are two different concerns. One is for building, and the other is for developing.

Here are the steps that I typically go through to get a solid Scala/Intellij development environment up and running for a new Scala project.

- Step 1: Install Scala Intellij Plugin

- Step 2: Create a simple sbt project - details here

- Step 3: Add the fantastic sbt-idea plugin to your sbt config

- Step 4: `sbt gen-idea`

- Step 5: Open project in Intellij 12

- Enjoy debugging, syntax highlighting, code assist and all of the other nice IJ features.

On the sbt side, I typically keep a terminal open, with sbt running so that I can rapidly test things outside the context of Intellij.

HTH

Problem

I've seen a few articles describing how to debug Scala applications, but nevertheless I want to ask it again due to the reason that all those articles are outdated and all things change very quickly in Scala world. I use IntelliJ Idea 12 + sbt (not a plugin, a plugin doesn't work for some reason). So how do I do that nowadays?

Original source

Related problems