推荐学习书目
› 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
blond
V2EX  ›  Python

python gdb 调试查看变量值

  •  
  •   blond · Mar 26, 2014 · 5021 views
    This topic created in 4568 days ago, the information mentioned may be changed or developed.
    我有一正在运行的python程序,我用gdb调试该程序时,怎么查看当前存在的变量值呢
    5 replies  •  1970-01-01 08:00:00 +08:00
    9hills
        1
    9hills  
       Mar 26, 2014 via iPad
    https://wiki.python.org/moin/DebuggingWithGdb
    http://blog.log4d.com/2013/11/python-gdb/

    但是有个缺陷,必须以编译了debug 支持的python才行,Ubuntu 下是Python-dbg
    ivanlw
        2
    ivanlw  
       Mar 27, 2014
    python不是用pdb调试么……
    judezhan
        3
    judezhan  
       Mar 27, 2014
    pdb多好用啊。。。楼主为啥要用gdb?
    mengzhuo
        4
    mengzhuo  
       Mar 27, 2014
    ipdb更牛……为何gdb
    blond
        5
    blond  
    OP
       Apr 1, 2014
    @ivanlw 因为是我的程序已经在运行了,出现了bug需要查看出现bug的原因,pdb可以调试正在运行的程序么
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5312 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 03:33 · PVG 11:33 · LAX 20:33 · JFK 23:33
    ♥ Do have faith in what you're doing.