[wingide-users] I/O while debugging

Charles Hartman charles.hartman at conncoll.edu
Sun Dec 26 22:49:45 EST 2004


I reported the bug (it was a bug) and got a very quick response (it's 
on the list for 2.0.2) -- thanks very much to WingWare! The other stuff 
I asked about was mostly just my errors. The r for raw input does work 
-- though in the Python Shell panel of the Tool Box triple-quoted 
strings don't work (can't start a new line inside one).

Here's another item, not a bug exactly: Is there any way, under X11 
under Mac OS X, to make a click on a button in an inactive window both 
activate the window and press the button? This is default OS X 
behavior, and a real help. I use a separate Wing Tool Box (on a second 
monitor), and operations that require going back and forth between 
editor and tool box get noticeably slowed down by the need to click 
twice just to (for example) establish a cursor.

Finally, is there any way to exclude variables from the Stack Data 
panel? Often I want to check just a few, and they're scattered within a 
long alphabetized list.

Thanks again. At last I have an environment for Python GUI apps on OS X 
that actually works, and that's really well supported.

Charles Hartman
http://cherry.conncoll.edu/cohar
http://villex.blogspot.com

On Dec 26, 2004, at 1:42 AM, Wing IDE Support wrote:

> On Sat, 25 Dec 2004, Charles Hartman wrote:
>> A newbie question, or rather several:
>>
>> While I'm debugging a module (using Debug Current File), I want to
>> supply test inputs. I've given the module code for that (outside the
>> class to which the module is mostly devoted):
>> 	st = raw_input()
>> 	while st != "quit":
>> 		res = s.Syllabize(st)
>> 		print res
>> 		st = raw_input()
>> I hit Debug Current File, then type some input (a word) in the Debug
>> I/O window, and see the results there. Well, once. If I then quit
>> (either way) and fix something and try again, WingIDE crashes. Using
>> input(prompt) doesn't seem to help; anyway it just calls raw_input.
>> What basic fact(s) about I/O, and/or the IDE, am I forgetting? What's
>> the right way to do this?
>
> First, make sure you're using the latest version of Wing (2.0.1).  
> There
> were some bugs with this in older versions.
>
> If you are using 2.0.1, try using an external console to see if that
> solves the problem.  There is extra I/O multiplexing code in the debug
> process when you're using the integrated I/O panel, and it's possible
> there is a problem with it in your case.  You can set Wing to use an
> external console from the Options menu in the Debug I/O tool.
>
> If that is indeed indicating a bug, please submit a but report from
> the Help menu and select the "include error log" checkbox.
>
>> Also related -- maybe: As far as I can tell, using the syntax
>> 	sre.compile(r""" . . . """)
>> doesn't work. It acts as though the r flag isn't there.
>
> The debugger should show the string correctly but won't put an 'r' in
> front of the string because the notion of a raw string only exists at 
> the
> source level and not once the string has been created in memory by the
> interpreter.  Unicode strings should show 'u' before the string in the
> debugger, however.
>
>> Another topic: I see that while using Debug Current File it's not
>> possible to set breakpoints. Is that a feature, a bug, an oversight, 
>> or
>> a misunderstanding on my part?
>
> It should be possible to set a breakpoint on any Python code.  One 
> thing
> to check is whether Wing sees your particular file as Python (the 
> keywords
> "def", etc, should be syntax highlighted).  Also, if you mean that 
> while
> your debug process is running and in a raw_input() that you can't set a
> breakpoint, that might also be fixed by using an external console.  
> Wing
> should keep the debug process responsive while in a raw_input() but 
> there
> is special code that makes that so, and if you're encountering bug you 
> may
> not be able to Pause or set breakpoints at that point in time (but you
> should always be able to set break points before starting the debug
> process).
>
>> Am I right that while I can check values (in Stack Data) using
>> breakpoints, in the Personal Edition there's no way to Watch a
>> variable, that is, no way to set a conditional breakpoint?
>
> Yes, correct.  Personal omits conditional and other forms of 
> breakpoints
> and also omits the watch manager, debug probe, and other more advanced
> debugging tools.  You can use Wing IDE Pro on a free trial from
> http://wingware.com/wingide/trial if you and to try out those features.
>
> Hope that helps... please let us know if not.
>
> Thanks,
>
> Stephan Deibel
>
> --
> Wingware
> Wing IDE for Python
> Advancing Software Development
>
> www.wingware.com
>



More information about the wingide-users mailing list