Issues debugging scala apps

I'm trying to debug a Scala app but the IntelliJ debugger doesn't seem to work. It pauses program execution on breakpoints but it doesn't highlight the "current" line of code so when I try to step over or step into functions it's hard/impossible to tell which line of code is executing.

Any ideas?

Cheers,
James

2 comments
Comment actions Permalink

Hi, James,
We need to know more about the problem. What version of the scala plugin do you use? Is the problem appears on some specific project and breakpoints or you have it with all projects? Example of a such project would be very helpful.

0
Comment actions Permalink

So it seems like I can get the debugger to work if I create a Non-SBT Scala application.

If I try to create a simple console app using SBT though, I'm not sure how to configure the "build config". I tried creating a new config from the "Scala Script" template, simply changing this to indicate the location of my mainApp.scala script file but when I try to debug/run that configuration IntelliJ says "Error:Scala script file not found"... I'm specifying a full path to the file, so it's difficult to imagine why it can't find the script file :-(

My ultimate goal is to use the Scala Play framework however (not hello world console applications). If I ceate a Play application from IntelliJ using the Play 2.x project template and try to run this, once again, it asks me to create a build config and I'm not too sure what to do. I created a config from the "Play 2 App" default/template, leaving all the defaults (just changing the name) and when I try to run this IntelliJ

  1. Spends a few minutes downloading tonnes of JAR files for Play
  2. Finally shows "java.lang.RuntimeException: No main class detected." in the Run console


So I can neither run not debug SBT or Play applications in IntelliJ...

Using plugin version 0.41.2


Cheers,
James

0

Please sign in to leave a comment.