I am new to Scrapy and Python and I am enjoying it.
Is it possible to debug a scrapy project using Visual Studio? If it is possible, how?
I've created a init file named runner.py
from scrapy.cmdline import execute
execute(['scrapy','crawl', 'spider_name'])
you just need to set that file as the startup in the project options.
it works with visual studio 2015
You can install PTVS in visual studio 2012. Then create a python project from existing python code, and import your code.
If you are familiar with Visual Studio, it's the same as other languages in Visual Studio, like C++/C#. Just create some break points and start your script with Debugging.
As ThanhNienDiCho said, add "-mscrapy.cmdline crawl your_spider_name" to your interpreter argument.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With