跳转到主要内容

UNKNOWN

项目描述

安装

您需要编译带有Python支持的GDB和

pdbinject

包。

easy_install pdbinject

OS X 注意事项

默认的GDB没有编译Python支持。

Homebrew可以修复这个问题

brew install gdb

用法

$ python example/loop.py &
Process running with PID 6319

$ sudo pdbinject 6319
Remote PDB has been configured on port 4444

        nc 127.0.0.1 4444

$ nc 127.0.0.1 4444
--Return--
> /home/ubuntu/pdbinject/pdbinject/debugger.py(16)run()->None
-> debugger.set_trace()

现在有点乐趣

from guppy import hpy
hp = hpy()
heap = hp.heap()
heap.get_rp()

要打印所有线程的堆栈跟踪

import sys, traceback
for thread_id, stack in sys._current_frames().iteritems(): print 'Thread id: %s\n%s' % (thread_id, ''.join(traceback.format_stack(stack)))

项目详情


下载文件

下载您平台上的文件。如果您不确定选择哪个,请了解更多关于安装软件包的信息。

源分发

pdbinject-0.2.0.tar.gz (3.5 kB 查看哈希值)

上传时间:

由以下机构支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面