[英]intellij IDEA debug mode: Exception in thread "main" java.lang.ClassNotFoundException: kotlinx.coroutines.debug.AgentPremain
I am using intellij:我正在使用智能:
IntelliJ IDEA 2022.3.1 (Ultimate Edition).
Build #IU-223.8214.52, built on December 20, 2022
Runtime version: 17.0.5+1-b653.23 aarch64.
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
The architecture is aarch64
.架构是aarch64
。 And I am using Apple M1 Pro
based MacBook Pro and the MacOS version is 13.1 (22C65)
.我正在使用基于 Apple M1 Pro
的 MacBook Pro,MacOS 版本为13.1 (22C65)
。
My project is based on spring boot
and I am able to run it as usual.我的项目是基于spring boot
的,我可以像往常一样运行它。 But when I run the project in debug mode, I am facing below error:但是当我在调试模式下运行项目时,我面临以下错误:
Connected to the target VM, address: '127.0.0.1:59789', transport: 'socket' Exception in thread "main" java.lang.ClassNotFoundException: kotlinx.coroutines.debug.AgentPremain at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:431) at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525) FATAL ERROR in native method: processing of -javaagent failed Disconnected from the target VM, address: '127.0.0.1:59789', transport: 'socket'连接到目标VM,地址:'127.0.0.1:59789',传输:'socket'线程“main”中的异常java.lang.ClassNotFoundException:kotlinx.coroutines.debug.AgentPremain at java.base/jdk.internal.loader .BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java :521)致电java.INSMERTER/SUN.INSTRUMER.INSTRUMENT.INSTRUMETIONIMPL.LOADCLASSANDSTARTAGENT(INSTERLEATIONIMPL.java8888888:431) javaagent 失败与目标 VM 断开连接,地址:'127.0.0.1:59789',传输:'socket'
Process finished with exit code 134 (interrupted by signal 6: SIGABRT)进程以退出代码 134 结束(被信号 6 中断:SIGABRT)
I have no idea why intellij is expecting kotlinx
based classes.我不知道为什么 intellij 期望基于kotlinx
的类。 My project has no kotlin dependencies at all.我的项目根本没有 kotlin 依赖项。
On looking at wiki - i see below在查看 wiki - 我在下面看到
IntelliJ Idea itself is written in Java and Kotlin, so i think this issue is specific to the intellij idea binary/version/architecute
i am using. IntelliJ Idea 本身写在 Java 和 Kotlin,所以我认为这个问题是特定于我正在使用的 intellij idea binary/version/architecute
。
Could anyone suggest me how to get this resolved.谁能建议我如何解决这个问题。
Note: I am able to run the same project in STS/Eclipse
in debug mode, so definitely its not my project issue but intellij idea ide issue.注意:我能够在STS/Eclipse
中以调试模式运行同一个项目,所以这绝对不是我的项目问题,而是 intellij idea ide 问题。
I raised a bug on jetbrains but believe more in sof, so this post.我在 jetbrains 上提出了一个错误,但更相信 sof,所以这篇文章。
Well its resolved by jetbrains -好吧,它由 jetbrains 解决了 -
Settings (Preferences on macOS) | Build, Execution, Deployment | Debugger | Kotlin | Disable coroutine agent.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.