How to use PyCharm to debug Scrapy projects

Create a Python file on crawler folder on your project. I used

  • Project
    • Crawler
      • Crawler
        • Spiders
      • scrapy.cfg

Inside your put this code below.

from scrapy import cmdline    
cmdline.execute("scrapy crawl spider".split())

And you need to create a “Run Configuration” to run your

Doing this, if you put a breakpoint at your code it will stop there.