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
510908220
V2EX  ›  Python

Python 调试整理

  •  
  •   510908220 ·
    510908220 · 2019-05-30 09:35:33 +08:00 · 2501 次点击
    这是一个创建于 1764 天前的主题,其中的信息可能已经有所发展或是发生改变。

    整理了一下 python 调试的一些库的使用.

    1. pdb 类调试
    2. 日志类

    https://github.com/510908220/python-debugging-skills

    相信大家一定会喜欢上这些库的,确实方便多了。

    16 条回复    2019-05-31 07:53:57 +08:00
    shuax
        1
    shuax  
       2019-05-30 09:44:33 +08:00   ❤️ 1
    不要给我说什么底层原理、框架内核!老夫调试只用 print
    leonme
        2
    leonme  
       2019-05-30 09:52:54 +08:00 via Android
    分布式调试除了看 log 别无他法了吧
    corvofeng
        3
    corvofeng  
       2019-05-30 10:05:32 +08:00 via Android
    本地调试我还是推荐 ipython embed
    510908220
        4
    510908220  
    OP
       2019-05-30 10:22:26 +08:00   ❤️ 1
    @leonme 但是用像 better-exceptions 这样的库,日志信息更完善,也是很有帮助的
    510908220
        5
    510908220  
    OP
       2019-05-30 10:23:20 +08:00
    @shuax 带上我
    510908220
        6
    510908220  
    OP
       2019-05-30 10:24:46 +08:00
    @corvofeng 我了解一下,谢谢
    GrassSand
        7
    GrassSand  
       2019-05-30 10:41:00 +08:00
    print 一把梭
    参考 https://www.dongwm.com/post/141/
    qq976739120
        8
    qq976739120  
       2019-05-30 10:44:19 +08:00
    本地 print,服务器上 log,三年了...
    chengxiao
        9
    chengxiao  
       2019-05-30 12:35:19 +08:00
    虽然感觉有很多调试库 但是还是 print 顺手啊.....
    xiaket
        10
    xiaket  
       2019-05-30 12:40:12 +08:00
    ytmsdy
        11
    ytmsdy  
       2019-05-30 12:49:34 +08:00 via iPhone
    直接 print 调试。。。
    chenqh
        12
    chenqh  
       2019-05-30 12:57:26 +08:00 via Android
    better-excepttion 和 tornado 在一起,有什么最佳实践吗
    smdbh
        13
    smdbh  
       2019-05-30 13:01:26 +08:00
    @shuax 膜拜插件大佬
    foxyier
        14
    foxyier  
       2019-05-30 17:23:19 +08:00
    @GrassSand 默默的从你的参考转到 python3.8 的新功能介绍。:=不是 go 的么。。
    xpresslink
        15
    xpresslink  
       2019-05-30 22:20:42 +08:00
    pdb 是什么?没听过。
    老夫只会 pycharm 行号上点个红点
    hmxxmh
        16
    hmxxmh  
       2019-05-31 07:53:57 +08:00 via Android
    @xpresslink 断点调试咯
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3152 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 12:22 · PVG 20:22 · LAX 05:22 · JFK 08:22
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.