Peakday
V2EX  ›  JetBrains

jetbrains ide debug 时有办法指定跟踪某个线程吗?

  •  
  •   Peakday · Aug 25, 2022 · 1640 views
    This topic created in 1367 days ago, the information mentioned may be changed or developed.

    多个线程执行相同的函数,debug 时来回切,想固定跟踪某一个线程

    2 replies    2022-08-25 11:47:41 +08:00
    Peakday
        1
    Peakday  
    OP
       Aug 25, 2022
    CLion
    psyche
        2
    psyche  
       Aug 25, 2022
    如果是 Java 的话,可以用条件断点,条件: ` Thread.currentThread().getId() == [tid]`, `tid` 可以先打普通断点用表达式求值获取
    其他语言估计有类似的思路
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1081 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 86ms · UTC 23:39 · PVG 07:39 · LAX 16:39 · JFK 19:39
    ♥ Do have faith in what you're doing.