Home > Software engineering >  Test framework quit unexpectetly; agent library failed to init: instrument
Test framework quit unexpectetly; agent library failed to init: instrument

Time:09-17

Every time I'm starting a debug in IntelliJ I receive:

Error occurred during initialization of VM
agent library failed to init: instrument
Failed to find Premain-Class manifest attribute in /Users/me/.m2/repository/org/jetbrains/kotlinx/kotlinx-coroutines-core/1.4.3/kotlinx-coroutines-core-1.4.3.jar

Process finished with exit code 1

I already

  • Restarted, invalidated caches
  • Updates all dependencies in the POM
  • Re-downloaded the project
  • Reset the project to various old branches
  • Deleted local maven cache

It only occurs when I want to debug. Test, compile, run, all works - just debug doesn't. Debug works as usual on all other projects.

Has anyone an idea what the hell is going on?

CodePudding user response:

There was an issue: KTIJ-17927 Debugger: "Failed to find Premain-Class manifest attribute" when debugging main function in jvmMain in MPP with coroutines

The workaround is to set File | Settings | Build, Execution, Deployment | Debugger | Data Views | Kotlin | Disable coroutine agent option. Or update to the latest IDE and Kotlin plugin version where it should be fixed.

  • Related