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

如何用 VSCode 调试 Celery 程序

  •  
  •   kevindu · Jan 11, 2018 · 4969 views
    This topic created in 3186 days ago, the information mentioned may be changed or developed.

    用 rdb 太累,http://docs.celeryproject.org/en/latest/userguide/debugging.html

    但是怎么才能在 VSCode 中调试 Celery 的程序呢。

    3 replies  •  2018-01-12 16:54:54 +08:00
    kevindu
        1
    kevindu  
    OP
       Jan 11, 2018
    pycharm 好像直接打断点就可以。vscode 就不行,需要做什么配置吗?
    Stitch
        2
    Stitch  
       Jan 12, 2018
    不用这么麻烦,把 task 任务的函数去掉 delay 就是在本地运行的。直接在本地调试完成后在添加 delay 运行即可。
    kevindu
        3
    kevindu  
    OP
       Jan 12, 2018
    @Stitch 我知道这样,但是这样也很麻烦,毕竟你自己要给函数传参,可能对一个陌生的程序,我根本不知道参数是什么。我想要的就是 web 运行起来,然后调某个 celery 的 task,然后就可以在这个 task 里面 debug。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2516 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 13:10 · PVG 21:10 · LAX 06:10 · JFK 09:10
    ♥ Do have faith in what you're doing.