如何使PyDev Debug Console交互? [英] How to make PyDev Debug Console Interactive?

查看:291
本文介绍了如何使PyDev Debug Console交互?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PyDev提供调试控制台以及交互式控制台。但是,我仍然无法在调试控制台中执行交互式命令,例如%timeit

PyDev offers both a debug console as well as an interactive console. However, I am still not able to execute interactive commands such as %timeit in the debug console.

如何让调试控制台互动?

How can I make the debug console interactive?

推荐答案

你目前无法使调试控制台成为IPython交互式控制台 - 您可以通过右键单击调试视图>中的堆栈帧来拥有常规交互式控制台。 PyDev>调试控制台,但它实际上不是一个支持IPython的交互式控制台。

You can't currently make the debug console an IPython interactive console -- you can have a "regular" interactive console by right-clicking a stack-frame in the Debug view > PyDev > Debug Console, but it's not really an interactive console with IPython support.

在断点的上下文中启动IPython会话可能最终会副作用可能会破坏你的调试会话,所以,它没有实现 - 虽然在实践中,可能没有什么能阻止任何人实现它(唯一的是应该有一个偏好,以便用户可以选择退出它以及实际实施它的时间和意愿。)

Starting an IPython session in the context of a breakpoint could end up having side effects that could break your debug session, so, it wasn't implemented -- although in practice, there's probably nothing stopping anyone from implementing it (the only thing is that there should probably be a preference so that users could opt out of it and the time and willingness to actually implement it).

另一种选择是反过来。启动一个交互式控制台并附加一个调试器 - 转到窗口>偏好> PyDev>交互式控制台并检查将控制台连接到调试会话?

Another option is turn things the other way around. Start an interactive console and have a debugger attached to it -- go to window > preferences > PyDev > Interactive Console and check Connect console to Debug Session?

请参阅: http://www.pydev.org/manual_adv_interactive_console.html#full -debug-support-in-interactive-console 了解更多详情。

See: http://www.pydev.org/manual_adv_interactive_console.html#full-debug-support-in-interactive-console for more details.

这篇关于如何使PyDev Debug Console交互?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆