本文介绍了Scrapy + Eclipse PyDev:如何设置调试器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经使用我的Scrapy项目成功地安装了Eclipse。我通过设置一个新的运行/调试配置来实现:
- 其主要模块链接到Scrapy / usr / local / bin / scrapy(我发现使用cmdline.py但在我的电脑上失败的建议(OSX Lion&
- 定义在我的情况下发送crawl ny的参数,就像我使用Scrapy命令行
- 设置正确的工作目录($ {workspace_loc:My Project / src}在我的情况下)
Eclipse可以成功启动我的项目,但我没有debbuger,我错过了我的断点和变量检查,有没有人知道如何设置debbugger与这种环境?
解决方案
抓取
在您的情况下I've successfully setup Eclipse with my Scrapy project.
I did it by setting a new Run/Debug configuration :
- Whose main module links to Scrapy /usr/local/bin/scrapy for me (I've found suggestion to use cmdline.py but that failed on my computer (OSX Lion & scrapy installed through easy_install)
- Defining the arguments to send "crawl ny" in my case as I would if I used the Scrapy command line
- Setting the correct working directory (${workspace_loc:My Project/src} in my case)
Eclipse can successfully launch my project, but I've no debbuger. I'm missing my breakpoints and variable inspection, does anyone know how to setup the debbugger with this environment ?
解决方案
- Keep the whole scrapy project folder under PyDev.
- You Need to set the main module to scrapy/cmdline.py
- Set arg to
crawl ny
in your case
这篇关于Scrapy + Eclipse PyDev:如何设置调试器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!