Peakday
V2EX  ›  JetBrains

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

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

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

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