The only time we reach for a debugger is when something goes wrong or breaks and our standard debugging techniques do not clear the root of the problem.
Sometimes it is much convenient to drop in to a debugger to see what is going on right in front of your eyes and hit hard at your code.
We can run the program using either the interactive debugger or print technique of debugging. But chances are you will not have gathered enough data on the first run to solve the problem successfully.
Python’s standard library contains an interactive source code debugger which can handle the surprise situations well.
Features of Python interactive source code debugger :
- Â Runs code in a controlled manner
- Â Allows stepping through a piece of code one line at a time
- Â Walking up and back down call trees
- Â Setting break points
- Â Uses the power of the Python shell for various levels of introspection and control.
The Python debugger is an indispensable tool when you have a problem .It is not an everyday tool, but when you get frust with the bugs you will know the importance of it.
>> Interactive Debugging in Python