V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
dantangfan
V2EX  ›  Python

Python 代码调试工具: pylane

  •  5
     
  •   dantangfan · 2019-02-02 10:13:17 +08:00 · 4264 次点击
    这是一个创建于 1902 天前的主题,其中的信息可能已经有所发展或是发生改变。

    赶在回家前发个帖,推荐下我们组的 python 代码 debug 工具,希望赚波 star。

    项目在这里 pylane

    简单原理是:通过 gdb trace python 进程,然后在该进程的 python vm 中动态地注入一段 python 代码, 从而对一个运行中的 python 进程执行一段任意的逻辑。

    这个是我们组日常线上 debug 工具的一部分核心代码,跟用 ipython 一样简单直观。

    求各位大佬轻拍

    17 条回复    2019-02-02 19:17:02 +08:00
    dantangfan
        1
    dantangfan  
    OP
       2019-02-02 10:30:52 +08:00   ❤️ 1
    这里也有一篇我们日常 debug 的经验总结 https://mp.weixin.qq.com/s/Mlhrp2E390EMD0ZfSaNFKw
    leopku
        2
    leopku  
       2019-02-02 10:40:34 +08:00
    前排收藏
    meiyoumingzi6
        3
    meiyoumingzi6  
       2019-02-02 11:07:33 +08:00 via Android
    伪前排收藏
    congeec
        4
    congeec  
       2019-02-02 11:34:16 +08:00   ❤️ 1
    dingyaguang117
        5
    dingyaguang117  
       2019-02-02 12:17:53 +08:00
    学习下
    dantangfan
        6
    dantangfan  
    OP
       2019-02-02 14:40:49 +08:00
    @congeec 对,看起来确实很像,不过 py3、自动补全等我们做的还是要稍微好些。更重要的是。。还在持续维护。。
    chenqh
        7
    chenqh  
       2019-02-02 14:41:22 +08:00
    收藏了
    chenqh
        8
    chenqh  
       2019-02-02 14:45:27 +08:00
    大佬们吊。
    xmoon
        9
    xmoon  
       2019-02-02 14:53:07 +08:00 via Android
    好像挺牛逼的
    fangpeishi
        10
    fangpeishi  
       2019-02-02 15:10:45 +08:00
    收藏一哈
    ChristopherWu
        11
    ChristopherWu  
       2019-02-02 15:17:26 +08:00
    可以,微信那个文章写的很好,这个工具也很好用的样子,已经 star 了。
    Ehend
        12
    Ehend  
       2019-02-02 15:30:35 +08:00 via Android
    哇,正好需要,谢谢
    vision4fun
        13
    vision4fun  
       2019-02-02 16:00:18 +08:00 via iPhone
    牛批啊。 马客住。
    dantangfan
        14
    dantangfan  
    OP
       2019-02-02 16:59:35 +08:00
    @Ehend 八客气,有用就好~
    inframe
        15
    inframe  
       2019-02-02 17:53:36 +08:00 via Android
    注入这个功能不错,收藏+1
    akira
        16
    akira  
       2019-02-02 18:01:00 +08:00
    线上这样 debug,感觉怪怪的。。。
    dantangfan
        17
    dantangfan  
    OP
       2019-02-02 19:17:02 +08:00
    @akira emmm,并不罕见呀,保留事发现场
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5466 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 01:38 · PVG 09:38 · LAX 18:38 · JFK 21:38
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.