使用 AppEngine 开发服务器在 PyDev 中调试控制台
我正在尝试在 Ubuntu 上运行的 Eclipse/PyDev 中调试 Google AppEngine 项目。
调试通常工作正常,但我无法在调试控制台中计算表达式。我相信控制台正在启动 AppEngine 服务器,并暂停等待 AppEngine 开发服务器结束,因此我无法收到评估提示。
这是调试控制台中的输出:
pydev debugger: warning: psyco not available for speedups (the debugger will still work correctly, but a bit slower)
pydev debugger: starting
/home/eric/src/google_appengine/google/appengine/tools/appcfg.py:42: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
import sha
/home/eric/src/google_appengine/google/appengine/tools/dev_appserver_login.py:33: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
INFO 2010-11-02 22:00:13,657 appengine_rpc.py:153] Server: appengine.google.com
INFO 2010-11-02 22:00:13,679 appcfg.py:414] Checking for updates to the SDK.
INFO 2010-11-02 22:00:14,010 appcfg.py:428] The SDK is up to date.
WARNING 2010-11-02 22:00:14,011 datastore_file_stub.py:818] Could not read datastore data from /tmp/dev_appserver.datastore
INFO 2010-11-02 22:00:14,080 dev_appserver_main.py:443] Running application manualent on port 8080: http://localhost:8080
请注意,它永远不会在控制台末尾打印提示以输入要计算的表达式。
知道如何正确显示提示,以便我可以在调试期间评估表达式吗?
I am trying to debug a Google AppEngine project in Eclipse/PyDev running on Ubuntu.
Debugging generally works fine, but I am not able to evaluate expressions in the debug console. I believe the console is starting the AppEngine server and is pausing waiting for the AppEngine development server to end so I am not able to get the evaluation prompt.
This is the output in the debug console:
pydev debugger: warning: psyco not available for speedups (the debugger will still work correctly, but a bit slower)
pydev debugger: starting
/home/eric/src/google_appengine/google/appengine/tools/appcfg.py:42: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
import sha
/home/eric/src/google_appengine/google/appengine/tools/dev_appserver_login.py:33: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
INFO 2010-11-02 22:00:13,657 appengine_rpc.py:153] Server: appengine.google.com
INFO 2010-11-02 22:00:13,679 appcfg.py:414] Checking for updates to the SDK.
INFO 2010-11-02 22:00:14,010 appcfg.py:428] The SDK is up to date.
WARNING 2010-11-02 22:00:14,011 datastore_file_stub.py:818] Could not read datastore data from /tmp/dev_appserver.datastore
INFO 2010-11-02 22:00:14,080 dev_appserver_main.py:443] Running application manualent on port 8080: http://localhost:8080
Notice that it never prints a prompt at the end of the console for entering expressions to be evaluated.
Any idea how to get the prompt to properly come up so that I can evaluate expressions during debugging?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否考虑过使用应用程序中的 AppEngine 交互式控制台?
http://code.google.com/appengine/docs/python /tools/devserver.html#The_Development_Console
服务器当前正在使用 Python 解释器,这就是为什么你永远不会收到提示(因为它只是一个解释器,并且已经在使用中);如果您想在服务器上下文中运行 Python 表达式,那么您需要使用开发控制台。
第三方开发人员还提供了一个更“类似于控制台”的交互式 Python 会话版本: http ://con.appspot.com/console/help/about
Have you considered using the AppEngine interactive console that's part of your application instead?
http://code.google.com/appengine/docs/python/tools/devserver.html#The_Development_Console
The server is currently using the Python interpreter which is why you never get a prompt (because it's just a single interpreter, and it's already in use); if you're wanting to run Python expressions within the context of the server, the development console is what you'll want to use.
There's also a more "console-like" version of the interactive Python session available from third-party developers: http://con.appspot.com/console/help/about
尝试使用远程调试功能 - 我在 Apache + mod_wsgi 上遇到了潜在的类似问题,并通过设置
stdoutToServer=True
和sterrToServer=True
将输出路由到 PyDev 远程来解决它调试器:Try using the remote debugging capability - I run into potentially similar issue on Apache + mod_wsgi and resolved it by setting
stdoutToServer=True
andsterrToServer=True
to route output to the PyDev remote debugger: