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

如何用 VSCode 调试 Celery 程序

  •  
  •   kevindu · 2018-01-11 11:24:28 +08:00 · 3478 次点击
    这是一个创建于 2290 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

    3 条回复    2018-01-12 16:54:54 +08:00
    kevindu
        1
    kevindu  
    OP
       2018-01-11 12:27:35 +08:00
    pycharm 好像直接打断点就可以。vscode 就不行,需要做什么配置吗?
    Stitch
        2
    Stitch  
       2018-01-12 15:11:08 +08:00
    不用这么麻烦,把 task 任务的函数去掉 delay 就是在本地运行的。直接在本地调试完成后在添加 delay 运行即可。
    kevindu
        3
    kevindu  
    OP
       2018-01-12 16:54:54 +08:00
    @Stitch 我知道这样,但是这样也很麻烦,毕竟你自己要给函数传参,可能对一个陌生的程序,我根本不知道参数是什么。我想要的就是 web 运行起来,然后调某个 celery 的 task,然后就可以在这个 task 里面 debug。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1187 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 23:51 · PVG 07:51 · LAX 16:51 · JFK 19:51
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.