rev0
V2EX  ›  macOS

苹果 m1 芯片 idea 单步调试就卡死,有人碰到过吗

  •  
  •   rev0 · Jan 12, 2023 · 2750 views
    This topic created in 1236 days ago, the information mentioned may be changed or developed.
    例如这么一段代码:cn.hutool.core.date.DateUtil.parse("2022-01-01 00:00:00");
    单步 F8 必然卡七八秒,我人都卡没了,导致我现在 idea 全是断点(用播放按钮 ResumeProgram 不会卡死)。
    13 replies    2023-02-01 16:28:33 +08:00
    qianxiaoxiao
        1
    qianxiaoxiao  
       Jan 12, 2023
    有没有 是代码的问题 , 往往越离谱的 BUG 犯的错误也就越低级
    ql562482472
        2
    ql562482472  
       Jan 12, 2023
    你仔细看看断点是不是选了一些 jdk 自带的一些高频点位 这种就会特别慢
    rev0
        3
    rev0  
    OP
       Jan 12, 2023
    @qianxiaoxiao 这个应该也不是,我同事也这样
    @ql562482472 应该不是这个问题,我 idea 重装好几次,版本也不一样
    issakchill
        4
    issakchill  
       Jan 12, 2023
    去掉默认 tostring 显示试试?
    nanjingwuyanzu
        5
    nanjingwuyanzu  
       Jan 12, 2023
    先把断点全部去掉重启下项目看看,断点不要打在接口上
    sdfw23xd
        6
    sdfw23xd  
       Jan 12, 2023
    我的会卡一两秒
    learncat
        7
    learncat  
       Jan 12, 2023
    我遇到过这个问题; 是 默认的调试界面会渲染能看到对象的 toString 的结果。

    关闭 toString 的自动展示。Settins 里搜索 toString ,最后一个就是,关闭 toString 预览功能。
    rev0
        8
    rev0  
    OP
       Jan 12, 2023
    @learncat
    @nanjingwuyanzu
    @issakchill
    好像不太好使😂
    rev0
        9
    rev0  
    OP
       Jan 12, 2023
    用 arthas 跟踪了一下,见鬼了
    -[0.01% 4.078292ms ] java.util.List:stream() #177
    - [0.01% 4.183375ms ] java. util.stream.Stream:map() #177
    - [0.01% 4.120916ms ] java.util.stream.Collectors:toList() #179
    - [75.09% 34852.248667ms ] java.util.stream.Stream:collect() #179
    amwyyyy
        10
    amwyyyy  
       Jan 13, 2023
    俺也一样,第一遍调试必卡
    luoyonghao
        11
    luoyonghao  
       Jan 15, 2023
    俺也一样,zulu java8
    yiqiu2324
        12
    yiqiu2324  
       Jan 19, 2023
    这么玄乎的吗。。。
    zilongzixue
        13
    zilongzixue  
       Feb 1, 2023
    把 jdk 换成高版本的就行了,最新的 idea 是根据 jdk11 编译的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5397 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 01:12 · PVG 09:12 · LAX 18:12 · JFK 21:12
    ♥ Do have faith in what you're doing.