使用 Visual Studio 进行 Scrapy 调试 [英] Scrapy debug using Visual Studio

查看:82
本文介绍了使用 Visual Studio 进行 Scrapy 调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Scrapy 和 Python 的新手,我很享受.

I am new to Scrapy and Python and I am enjoying it.

是否可以使用 Visual Studio 调试scrapy 项目?如果可能,如何?

Is it possible to debug a scrapy project using Visual Studio? If it is possible, how?

推荐答案

我创建了一个名为 runner.py 的初始化文件

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.

它适用于 Visual Studio 2015

it works with visual studio 2015

这篇关于使用 Visual Studio 进行 Scrapy 调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆