The problem is that I can’t debug Scrapy crawlers in VS Code. The problem is that always when I start debugging it breaks on one of my imports. Of course, I played a lot with that import in order to fix it, but it didn’t helped. I also tried with venv and without venv, but it doesn’t helped.
Anyone faced the same issue?
2
Answers
I don’t have experience with Scrapy, but if this happens in debug mode only and it run’s ok otherwise (from CLI), than most likely there is problem with your Python paths.
Do you use Python virtual environment?
This was usually caused by incorrect python interpreter.
You could use shortcuts "Ctrl+Shift+P" and type "Python: Select Interpreter" to choose your python interperter.
If it doesn’t work, you could set
python
in yourlaunch.json
.https://code.visualstudio.com/docs/python/debugging#_python