首页
注册
登录
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
V2EX
›
Python
Python fork 的进程怎么 pdb 呢?
whx20202
·
2017 年 11 月 20 日
· 3372 次点击
这是一个创建于 3023 天前的主题,其中的信息可能已经有所发展或是发生改变。
我在程序一开始的时候 fork 一个进程,仅仅作为后台用,然后主进程就退出了
在业务代码里面 import pdb pdb.set_trace() 就报错
除了打日志还有什么好办法吗
fork
pdb
进程
import
4 条回复
•
2017-11-20 14:20:03 +08:00
1
dbow
2017 年 11 月 20 日
1
把进程的 stdin, stout , stderr 换成 pipe, 这样 pdb.set_trace 就能正常使用, 控制命令从 pipe 里输进去。
2
NoAnyLove
2017 年 11 月 20 日
1
http://blog.ptsang.net/debugging_python_multiprocessing
3
eric6356
2017 年 11 月 20 日
1
http://blog.shell909090.org/blog/archives/2450/
4
cherrot
2017 年 11 月 20 日
@
eric6356
简单高效!
关于
·
帮助文档
·
自助推广系统
·
博客
·
API
·
FAQ
·
Solana
·
2960 人在线
最高记录 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 23ms ·
UTC 08:07
·
PVG 16:07
·
LAX 00:07
·
JFK 03:07
♥ Do have faith in what you're doing.
❯