How to debug a Kotlin/Native application in IntelliJ?

20 Views Asked by At

I am trying to debug my Kotlin/Native (linuxX64) application in IntelliJ but I can't find a way to do it.

What I tried:

Press the play button play button

Then, click "Debug 'runDebugExecutableNa...'"

Gradle starts building, the application starts, but the breakpoints don't work (it never stops executing, the application just goes from start to end without interruption).

I have tried removing the Run Configuration as well as restarting the IDE, but no luck. I also tried following this guide: https://kotlinlang.org/docs/native-get-started.html#build-and-run-the-application

But it does not show me that "native.native-project | Debug" run configuration which I assume is added by IntelliJ automatically.

The drop down only contains "Current File" and the "runDebugExecutableNative" Gradle task. Current File does not allow me to click any of the play/debug buttons, and the Gradle task obviously does not actually debug the application.

I remember having done this before but when I tried it in an older project, it didn't work either.

I'm kind of clueless here. I expected IntelliJ to be fully able to debug Kotlin/Native applications, not just JVM.

0

There are 0 best solutions below