A bit of help debugging an SBT project?
So, I have this SBT project I should like to debug.
I have heard it say (e.g. over there) the "easiest way" to debug them using IntelliJ was to set up a remote configuration and connect the jvm to it.
Unfortunately, that's seems to be read a lot easier than done.
First, running "sbt -jvm-debug 5005" will result in
And consequently, IntelliJ refuses to connect to a jvm that does not exist.
I managed to get SBT running with
set SBT_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" && sbt
as suggested elsewhere (I'm on Win7, hence the set instead of export).
So when I now click the bug-icon to debug the configuration, I do get a
Connected to the target VM, address: 'localhost:5005', transport: 'socket'
But that's all i'm getting.
If I now set some breakpoints and run e.g.
test-only -- -n somefailingtestcase
then the testcase will run and fail but execution will not stop at the breakpoint and nothing will be displayed in the debugger console (except the "Connected to the target VM ...").
I'm fairly certain the execution does pass the breakpoint (tested it with println commands too), so I'd appreciate it if somebody could tell me what I am doing wrong and how I should be doing it instead.
请先登录再写评论。
Hi Victor,
It's better to post scala-related questions to the corresponding forum (asked jetbrains scala team to check the current thread though)
Denis
Except for the fact that there have been NO RESPONSES by the Scala team
to any posts in jetbrains.intellij.plugins.scala since January. It's
becoming very worrisome - as I depend on the plugin to do my job.
On 5/12/15 12:01 PM, Denis Zhdanov wrote:
>
Actually, I only mentioned Scala for the sake of completeness.
The issue likely isn't influenced by my project's language.
That's too bad :(
Will try to get their attention back to the scala forum
Denis
Your question was about SBT and it's supported by the intellij scala plugin in the ide eco-system.
Denis
Hi! Sorry for the late reply. Please make sure you have fork in Test := false in your project, because forked tests are run in another instance of JVM, not the one you're connected to.