The easiest way to debug python - especially easy for programmers get used to Visual Studio - is using PTVS (Python Tools for Visual Studio).
The steps is simple:
1. Download and install it from
http://pytools.codeplex.com/2. Set breakpotints and press F5.
3. Your breakpoint is hit, you can view/change the variables as easy as debug C#/C++ programs.
4. That's all :)
If you want debug Django using PTVS, you need do following steps:
1. In Project settings - General tab, set "Startup File" to "
manage.py", the entry point of Django program.
2. In Project settings - Debug tab, set "Script Arguments" to "runserver --noreload". The key point is the "--noreload" here. If you don't set it, your breakpoints then won't be hit.
3. Enjoy it.
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
https://www.v2ex.com/t/31508
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.