[wingide-users] Disabling evaluation-on-autocomplete-highlight in the debug probe?

Wingware Support support at wingware.com
Fri Jan 14 08:19:06 MST 2011

On 1/14/11 1:25 AM, Russell Warren wrote:
> A poor subject line, but... I'm using SQLAlchemy, and right now in the 
> debug probe (Wing 4b6) when I start typing a variable name like so:
> foo.
> and the autocomplete list pops up, Wing is doing something immediately 
> upon simple highlighting of an attribute in the pick list which 
> results in the __get__ code being fired and (in this case) SQL being 
> emitted.  This often causes exceptions and other grief when trying to 
> use the debug probe, dependent on the situation.  I also have this 
> issue with other code that uses __get__ or __getattr__, but the SQLA 
> example is an easy and current example to use.

Try unchecking the Debugger / Advanced / Allow Dynamic Introspection 
preference to see if that helps.

Unchecking Source Analysis / Introspect in Shells and disabling Debugger 
/ Hover Over Symbols should fix it in any case but with a loss of 

We've seen problems similar to this a few times before with database 
code and one user managed to work around it by wrapping the DB class in 
a way that prevented problems.  I don't know if that's a possibility in 
your case.  An idea would be to look at the stack (w/ the traceback 
module in your code) when these calls occur and write code to have the 
__get__ do something reasonable when being called from our introspection 
code.  You can also look at os.environ which will contain WINGDB_ACTIVE 
when the debugger is active but this does not help you distinguish 
between your own calls and ours.

I'll try to look at this in more detail at some point to see if there is 
more we can do to detect these cases, or to support fixing them without 
disabling too much functionality.  If you have a small example, that 
might be useful to have.



Stephan Deibel
Wingware | Python IDE
Advancing Software Development


More information about the wingide-users mailing list