What steps are needed to configure the IntelliJ debugger to attach to scala Play tests managed by sbt?
In IntelliJ 2019, you can attach the debugger to the sbt run
command using the debug button in the sbt shell with no configuration changes.
However, the debugger does not attach to the test
command.
Consider attaching the debugger via IntelliJ's sbt shell:
Use sbt shell for builds
Attach debugger to sbt shell
button (the icon looks like a bug)Connected to the target VM
(see the image bellow)test
command in the sbt shell tool windowNote if you are using Play like OP, then by default Play runs tests in forked JVM, so for the above technique to work try setting Test / fork := false
in build.sbt
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With