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.