I am working on Scrapy 0.20 with Python 2.7. I found PyCharm has a good Python debugger. I want to test my Scrapy spiders using it. Anyone knows how to do that please?
Extending @Rodrigo's version of the answer I added this script and now I can set spider name from configuration instead of changing in the string.
import sys from scrapy import cmdline cmdline.execute(f"scrapy crawl {sys.argv[1]}".split())