I am working on Scrapy 0.20 with Python 2.7. I found PyCharm has a good Python debugger. I want to test my Scrapy spiders using it. Anyone knows how to do that please?
<
I am also using PyCharm, but I am not using its built-in debugging features.
For debugging I am using ipdb. I set up a keyboard shortcut to insert import ipdb; ipdb.set_trace() on any line I want the break point to happen.
Then I can type n to execute the next statement, s to step into a function, type any object name to see its value, alter execution environment, type c to continue execution...
This is very flexible, works in environments other than PyCharm, where you don't control the execution environment.
Just type in your virtual environment pip install ipdb and place import ipdb; ipdb.set_trace() on a line where you want the execution to pause.
UPDATE
You can also pip install pdbpp and use the standard import pdb; pdb.set_trace instead of ipdb. PDB++ is nicer in my opinion.