I know there are a thousand posts on debugging in Python but I can't find what I am looking for....a visual debugger. For example:
one@localhost ~ $ cat duh.py
import pdb
class Coordinate(object):
pdb.set_trace()
def __init__(self, x, y):
self.x = x
self.y = y
def __repr__(self):
return "Coord: " + str(self.__dict__)
def add(a, b):
return Coordinate(a.x + b.x, a.y + b.y)
def sub(a, b):
return Coordinate(a.x - b.x, a.y - b.y)
one = Coordinate(100,200)
two = Coordinate(300,200)
add(one, two)
I want to see the values actually being used. Instead of seeing def __init__(self, x, y): I would like to see def __init__(self, 100, 200):
> /home/one/duh.py(14)<module>()
-> one = Coordinate(100,200)
(Pdb) s
--Call--
> /home/one/duh.py(4)__init__()
-> def __init__(self, x, y):
(Pdb) s
> /home/one/duh.py(5)__init__()
-> self.x = x
(Pdb) s
> /home/one/duh.py(6)__init__()
-> self.y = y
(Pdb) s
--Return--
> /home/one/duh.py(6)__init__()->None
-> self.y = y
I'm totally not used being blind on what is going on inside of the interpreter and really would like to see what is going on in the internals like other scripting language debuggers (like JavaScript step-throughs).
