Hello everyone, My build is failing here `org.jet...
# kotlin-native
g
Hello everyone, My build is failing here
org.jetbrains.kotlin.konan.library.resolver.KonanLibraryResolverKt$TopologicalLibraryOrder$1$1.invoke(KonanLibraryResolver.kt:40)
and I would like to inspect the code with breakpoints. Does someone knows how can I debug my konan build in IntelliJ? Where I’m using something like
./gradlew build
for now and all of my build scripts are
.gradle.kts
ones
g
idea supports gradle debug, not perfectly but supports, try to run this task in idea with debug (you can select it on task run from IDE)
if it will not work you can use standard remote Java debugger (see run configrations in Idea), for this you should run Gradle in debug mode and than attach debugger to it
o
another option is create self-contained reproducer and create an issue
g
Thanks guys, trying directly on the gradle sidebar and using the debug option I was able to stop on a breakpoint. But I was not able to debug the
org.jetbrains.kotlin.konan.library.resolver.KonanLibraryResolverKt
class yet. I’ve found the implementation of this class here:
<https://github.com/JetBrains/kotlin-native/blob/master/extracted/konan.serializer/src/org/jetbrains/kotlin/konan/library/resolver/KonanLibraryResolver.kt#L11>
But I don’t know which library or jar should I include in order to be able to debug there. (And if I know the correct jar, should I include it as a global library on IntelliJ?) Is it something inside of here
~/.konan/kotlin-native-macos-1.2-eap-8089
?
I think I have found the needed one:
~/.konan/kotlin-native-macos-1.1.2/konan/lib/konan.serializer.jar
, but now I don’t know how can I get the sources, so I’ll be able to debug.