Solution for debugging DCEVM enabled sbt-scala applications in IntelliJ IDEA

廉价感情. 提交于 2019-12-24 05:31:14

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!