问题
I use DCEVM to reload classes in my Scala application. Sbt has a nice feature that it can auto-compile classes when their source code changes. So what I do is I open up two sbt instances and I run ~;compile;copy-resources
in the first instance to auto-compile, and run
in the second instance.
To debug, I can use the remote debugger tool in IntelliJ that works pretty well except for one (but important) thing: whenever sbt reloads a class, IntelliJ no longer stops at break points. I have to restart the remote debugger in order to fix this, which is very inconvenient.
I do not really like the built-in compiler as it is really slow compared to sbt (and also not automatic), however, if I run the program from IntelliJ and execute the Compile file
command, the debugging works well.
How could I improve the development process either by having sbt and IntelliJ refresh the break points on class reload or by using another setup? Thank you in advance.
回答1:
The answer is pretty late, but: Have you tried the key combination Ctrl+F9 after you saved your modifications? You should see a baloon pop up saying that one/more classes has/have been modified.
Had the same problem with my Java application. The "refresh" helped.
来源:https://stackoverflow.com/questions/27966375/solution-for-debugging-dcevm-enabled-sbt-scala-applications-in-intellij-idea