Intellij Debugger slow: Method breakpoints may dramatically slow down debugging

现象

Method Breakpoints may dramatically slow down debugging

debug模式启动:
● 启动过程非常慢,console与运行日志处于卡顿状态
● 调试的时候运行非常慢,console与运行日志处于卡顿状态

在这里插入图片描述

定位

From the JetBrains Team: “Method breakpoints will slow down debugger a lot because of the JVM design, they are expensive to evaluate. Remove method breakpoints and consider using the regular line breakpoints.”.

To make the long story short, it seems that the root issue is that Method Breakpoints are implemented by using JPDA’s Method Entry & Method Exit feature. This implementation requires the JVM to fire an event each time any thread enters any method and when any thread exits any method.

来自 JetBrains 团队:“由于 JVM 设计,方法断点会大大降低调试器的速度,评估它们的成本很高。删除方法断点并考虑使用常规行断点。
具体可参考官方文章说明:

https://intellij-support.jetbrains.com/hc/en-us/articles/206544799-Java-slow-performance-or-hangups-when-starting-debugger-and-stepping
在这里插入图片描述

在这里插入图片描述

结论:
就是你打的断点太多,调试成本太高,所以造成卡顿

解决

关掉项目不必要的breakpoint, 建议每次搬完砖后清除历史的breakpoint,如果需要记录也可以用BookMark进行标记记录。
在这里插入图片描述
在这里插入图片描述

  • 4
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Pushkin.

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值