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, ou 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.
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, ou 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.
