Can't debug Java program in Intellij IDEA, FATAL ERROR in native method: processing of -javaagent failed

Answered

When I click the debug button, the program didn't start and showed me this error, but I doesn't use the kotlin.

Connected to the target VM, address: '127.0.0.1:45687', transport: 'socket'
Exception in thread "main" java.lang.NoClassDefFoundError: kotlin/Result
    at kotlinx.coroutines.debug.AgentPremain.<clinit>(AgentPremain.kt:24)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
    at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
FATAL ERROR in native method: processing of -javaagent failed
Disconnected from the target VM, address: '127.0.0.1:45687', transport: 'socket'

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
2 comments
Comment actions Permalink

Hello,

It looks like a known problem - https://youtrack.jetbrains.com/issue/KTIJ-15750 .

As a workaround, you can either disable the coroutine agent under Settings/Preferences | Build, Execution, Deployment | Debugger | Data Views | Kotlin or Kotlin plugin. (https://www.jetbrains.com/help/idea/managing-plugins.html)

Sorry for the problem.

0
Comment actions Permalink

thanks, I disabled coroutine agent and this worked!

0

Please sign in to leave a comment.