简体   繁体   English

如何在本地主机上调试PyDev GAE项目?

[英]How to debug PyDev GAE project on localhost?

How does one simply print out a small string or inspect when running the local Google App Engine server out of Eclipse to debug a PyDev GAE project? 从Eclipse中运行本地Google App Engine服务器以调试PyDev GAE项目时,如何简单地打印出一个小的字符串或进行检查?

I tried solutions such as this , but I am not able to find the logs in the local admin console, nor are they appearing in my Eclipse console. 我试图解决方案,如这个 ,但我不能够在当地找到管理控制台的日志,也不是我的Eclipse控制台出现。

PyDev breakpoints do not seem to be hit either, even when I use "Debug As.." 即使我使用“调试为”,PyDev断点似乎也不会被击中。

What's the best way to go about this? 最好的方法是什么?

Add this 加上这个

import pdb;pdb.set_trace()

just after the place you want breakpoints. 就在您想要断点的地方之后。 Then use print statement from terminal to print whatever you what to print. 然后从终端使用print语句打印要打印的内容。 You can also use pprint. 您也可以使用pprint。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM