Inside your scrapy project folder create a
runner.py
module with the following:import osfrom scrapy.cmdline import executeos.chdir(os.path.dirname(os.path.realpath(__file__)))try: execute( ['scrapy','crawl','SPIDER NAME','-o','out.json', ] )except SystemExit: pass
Place a breakpoint in the line you wish to debug
Run
runner.py
with vscode debugger
↧
Answer by fmagno for Debugging Scrapy Project in Visual Studio Code
↧