Reputation: 4923
I have a basic understanding of how a debugger work but that is in context of compiled languages. How does a debugger like pdb
work?
At a very high level, I am looking for something that can explain internals of pdb
or in general "debugging interpreted languages"
I googled up but couldn't get any doc. This question might be too broad but link to some basic documents would allow me to study further.
Upvotes: 4
Views: 1890
Reputation: 22061
From Python 2.7 Documentation:
It supports setting (conditional) breakpoints and single stepping at the source line level, inspection of stack frames, source code listing, and evaluation of arbitrary Python code in the context of any stack frame.
As mentioning above pdb provides you way of inspection stack frames(watching, listing, evaluation of code within frame).
Diving into frame objects would definitely help you in understanding pdb module. See inspect — Inspect live objects and The interpreter stack.
Upvotes: 1