V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
James369
V2EX  ›  Android

AndroidStudio 这个 Logcat 如何过滤时顺便包含上下文信息?

  •  
  •   James369 · 2022-05-27 12:45:17 +08:00 · 3021 次点击
    这是一个创建于 661 天前的主题,其中的信息可能已经有所发展或是发生改变。

    在 linux 系统中 grep 的时候,可以指定搜索到的内容增加上下几行的上下文信息,有时经常可以在这个上下文信息中发现有价值的线索。比如: cat haystack.txt | grep -2 needle

    类似的功能在 AndroidStudio 的 logcat 中如何实现呢?

    2 条回复    2022-05-27 13:05:51 +08:00
    kaicity
        1
    kaicity  
       2022-05-27 13:05:27 +08:00
    直接 adb logcat 吧
    rosu
        2
    rosu  
       2022-05-27 13:05:51 +08:00 via iPhone
    as 自带的估计不行了。不如直接用 adb logcat 或者 pidcat
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5825 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 02:41 · PVG 10:41 · LAX 19:41 · JFK 22:41
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.