Intellij Idea kotlin debugger evaluator expression give class not found error

I build kotlin native compiler 2.1.0 from github with Java 21. 

```

set -ef
JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005" /Users/user/project/github/kotlin/kotlin-native/dist/bin/kotlinc-native “$@”

```

I setup the debugger script to run kotlin native and then use JVM remote debugger to connect the debugger. 

When I evaluate ‘1’ in the evaluate expression field, I get the following error

```

org.jetbrains.kotlin.analysis.api.components.KaCodeCompilationException : java.lang.IllegalStateException: Class not found: kotlin/Any

```

I am with IntelliJ IDEA 2024.3.1 (Community Edition)

The debugger version in IntelliJ IDEA  2023 even cannot stop on the break point. 

0

Hello,

 

You're encountering ("Class not found: kotlin/Any") suggests that the Kotlin Native runtime is not properly included or configured in the debug environment. To resolve this:

Ensure the correct Kotlin Native runtime libraries are included in your build.
Verify your remote debugger setup and that it recognizes Kotlin Native code.
Make sure you are using a compatible Java version (try Java 17 if issues persist with Java 21).
Check if the latest updates for IntelliJ IDEA and Kotlin plugins are installed.
Test with a simple Kotlin Native project to isolate the issue.

 

Best Regard,

 

0

请先登录再写评论。