V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Peakday
V2EX  ›  JetBrains

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

  •  
  •   Peakday · Aug 25, 2022 · 1598 views
    This topic created in 1345 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   ·   2404 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 02:10 · PVG 10:10 · LAX 19:10 · JFK 22:10
    ♥ Do have faith in what you're doing.