https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
v

vsazel

07/02/2019, 11:54 AM
Hi, Is there possibility to configure gradle to run tests in debug mode from IntelliJ for Node.js Javascript with multiplatform plugin? jvmTest works ok. But jsNodeTest and jsBrowserTest not. It never stops for the breakpoint.
I can do this.
Copy code
kotlin {
    jvm()
    js {
        nodejs {
            testTask {
                debug true
            }
        }
    }
This starts the Node.js debugger, but stops Gradle task execution because it starts with
--inspect-brk
as in here https://github.com/JetBrains/kotlin/blob/8995d89599690867782ed43e5a9bce47016bd2eb/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/targets/js/testing/KotlinJsTest.kt#L108 I can connect other debugger such as Chrome or IntelliJ Node.js debug, but it won't go through the Kotlin code.
update: it will go through Kotlin code, but only if I set breakpoint in JavaScript code and step in the Kotlin code