python tools visual studio - step into not working

和自甴很熟 提交于 2019-12-14 02:11:57

问题


I am trying to debug a scrapy project , built in Python 2.7.1 in visual studio 2013. I am able to reach breakpoints, but when I do step into/ step over the debugger seems to continue the exceution as if I did resume (F5). I am working with standard python launcher. Any idea how to make the step into/over functionality work?


回答1:


You need to enable Tools -> Options -> Python Tools -> Debugging -> Enable debugging of the Python standard library. https://github.com/Microsoft/PTVS/issues/106




回答2:


workaround rather than full answer.

I encountered this problem while importing my own module which ran code (which was erroring) on import.

By setting the imported module to the startup script, I was able to step through the startup code in the module and debug.

My best guess is that visual studio 2015 decided the imported module was a python standard library, but it really isn't viable to turn on the 'debug standard library option' as many standard library modules generate errors on import themselves.



来源:https://stackoverflow.com/questions/37240431/python-tools-visual-studio-step-into-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!