IDEA启动正常debug启动报错

项目场景:

很奇怪的一个问题,项目运行正常,debug启动直接报错,运行不起来

Exception in thread "main" java.lang.ClassNotFoundException: kotlinx.coroutines.debug.AgentPremain
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:304)
	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:52865', transport: 'socket'

原因分析:

看错误分析问题:

  1. kotlinx 没有安装,新版本用kotlinx语言
  2. jdk路径不正确或未正确配置
  3. 启动类vm各种参数添加尝试

开始一个一个实验,都以失败告终,因为正常run是可以启动的,其实这些东西应该都是正确的


解决方案:

idea的设置中Debugger配置中的启用一个参数,:

Kotlin:

  • Disable coroutine agent

似乎是默认启用了携程代理,禁用之后就恢复正常了

相关推荐

  1. IDEA启动正常debug启动

    2024-06-16 16:36:01       10 阅读
  2. eclipse启动

    2024-06-16 16:36:01       20 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-06-16 16:36:01       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-06-16 16:36:01       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-06-16 16:36:01       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-06-16 16:36:01       20 阅读

热门阅读

  1. 15_2 Linux Shell基础

    2024-06-16 16:36:01       5 阅读
  2. python 去除图片马赛克

    2024-06-16 16:36:01       4 阅读
  3. qgis导入excel文件

    2024-06-16 16:36:01       6 阅读
  4. pytorch支持更多onnx算子

    2024-06-16 16:36:01       7 阅读
  5. 一血c++

    2024-06-16 16:36:01       6 阅读
  6. (简单)html转图片-html2canvas

    2024-06-16 16:36:01       7 阅读
  7. v3+ts/request封装axios

    2024-06-16 16:36:01       8 阅读
  8. Vue基础面试题(三)

    2024-06-16 16:36:01       6 阅读
  9. Web前端指令符:解码、应用与挑战

    2024-06-16 16:36:01       5 阅读
  10. 【无标题】

    2024-06-16 16:36:01       5 阅读