[wingide-users] Keeping debugger out of "other" files

Wingware Support support at wingware.com
Mon Aug 15 10:21:24 EDT 2005


On Mon, 15 Aug 2005, Michael Hipp wrote:
> Luc Bourhis wrote:
> > On 13 Aug 2005, at 01:27, Michael Hipp wrote:
> > Is there any way to tell the debugger to never go outside my project 
> > files to 
> > display the location of an unhanded exception.
> > 
> > Frequently it will dive deep into some of the core packages for wxPython to 
> > report a bug that is actually in my own code. It would be safer and more 
> > useful to stick to the files in the project. If you're not paying attention 
> > you can mistakenly be editing some far flung file outside the project. 
> > Plus, 
> > it has now taken me to a place where the actual error probably is not and I 
> > have to make my way back.
> > 
> > As far as I know Python does not provide an easy way to throw a 
> > exception from higher in the stack trace than the line of code where the 
> > problem has occurred, in the manner the Carp module does it in Perl, 
> > which is a pity since pre-condition violations are nearly always better 
> > signalled in the calling code than in the callee for example.
> > 
> > Since Python does not provide this feature, it would indeed be nice if 
> > the debugger could do so. I would reckon two alternatives: clim the 
> > stack until (a) one has moved out of the faulty module and (b) one has 
> > moved out of the faulty package.
> 
> To me, knowing nothing of the internals of Wing IDE, it would be a 
> fairly simple matter to climb upwards until it finds it is in a file 
> that is a part of the project.

In fact Wing already does this internally to omit frames within our 
own debugger modules, which are usually present.  I think the 
suggestion is a good mode to implement, although it will work better
and seem more robust after we have projects that auto-update the files 
within directories.  Otherwise a new module would arbitrarily be 
omitted, and that could get confusing.  Also, I'm not sure we should 
trim off frames, but just start by default in your own code.  
Otherwise, it would be confusing when you do in fact uncover a bug in 
a library, or need access to the library code in order to understand 
and fix the bug in your code.

- Stephan


More information about the wingide-users mailing list