[wingide-users] stack data view doesn't display the return value of __repr__() for objects

Wingware Support support at wingware.com
Thu Aug 11 07:24:02 EDT 2005


On Wed, 10 Aug 2005, Gigi wrote:
> It looks like the stack data view displays its own representation of
> objects instead of using __repr__() as it should. According to the
> Python docs __repr__ is meant exactly for providing rich debug info:

We avoid __repr__ on purpose because using it brings out bugs in a 
number of commonly used Python packages, causing the debug process to 
crash.  In general, the task of showing values in the stack data view 
is quite tricky because of this problem that it exersizes potentially 
buggy code in extension modules, can get into infinite or very lengthy 
loops, etc.  As a result, we handle the user's code as gently as 
possible and this is part of that -- a somewhat unfortunate 
requirement of writing a Python debugger that actually works reliably 
while working on buggy code.

For now, obviously, the work around is using the Debug Probe.  We're 
certainly open to ideas, also, on how to let __repr__ be displayed 
more easily in the stack view.  Perhaps a way to right-click and 
request it for a particular value.  I'd resist a preference that just 
does that by default because people will set it and forget it and then 
run into crashing they don't understand (and of course blame on the 
debugger ;-).

- Stephan



More information about the wingide-users mailing list