Archaeopteryx Software, Inc.
Take Flight!Search

Home
Wing IDE
News
Support
About Us
Python
Open Source
Store

 Search:
 
 Advanced Search




[wingide-users] debug cursor disappears when using interactive shell

Stephan R.A. Deibel sdeibel@archaeopteryx.com
Tue, 13 Nov 2001 10:49:35 -0500 (EST)


On Tue, 13 Nov 2001, Steven D. Arnold wrote:
> I searched for an answer to this on the Archaeopteryx web site and the
> manual.  Unfortunately, the archives do not appear to be searchable;
> if this question has been answered in the past and someone would like
> to point me at a URL with the appropriate posts, that'd be great, and
> my thanks in advance.

Searching on the site in general includes also the mailing list archives.
However, there is currently no search that is constrained to just the
mailing lists.

> When I debug a file, I reach a point where I need to type in some code
> and see what happens with it.  Usually (but not always) when I do
> this, Wing IDE seems to lose track of the debugging session.  The
> cursor that identifies the next line to be executed disappears.  And
> when I click the "step over" button, the debugger seems to hang
> entirely -- I can't click "step over," "step in" or most of the other
> debug control buttons.  I pretty much have to quit Wing IDE and
> restart it to do anything useful.  Also, it /seems/ that this behavior
> happens more often when the code I typed produces an exception of some
> kind.  This last bit of information is just going by my memory from
> having worked with Wing IDE.
> 
> Is this a known problem?  Could it be that Wing IDE is not compatible
> with ActivePython 2.1?  Anyone have any other ideas?

Your report sounds like one of several known problems in Wing IDE that are
currently being worked on:

(1) Any time the debug process does any kind of input with input(),
raw_input(), or otherwise, the debug network connection is not being
serviced properly until the input is obtained and execution of the debug
process continues.  This can lead to dropping of the debug connection or
failure to respond to step or pause commands.

(2) If you type anything in the Debug Probe that invokes code that
requests keyboard input, Wing will lose the debug connection and the input
is requested from the console from which you started Wing instead of from
the Debug Probe.

It has nothing to do with ActivePython, which by the way so far in each
version I have checked, is identical to regular Python except for
copyright notice changes.

I'm not entirely sure from what you write whether the prompt that's
disappearing is in the Debug Probe or one that you're putting up from
your debug process, but it sounds like you're running into one of the
above problems.

The solution is to run your debug process so you have access to its I/O
(described below) and to avoid pushing step commands, pause, or setting
breakpoints while your debug process is paused waiting for keyboard input.  
Also, for now you need to avoid typing anything in Debug Probe that ends
up requesting keyboard input (e.g., 'license()' under Python 2.x).

We're trying to fix these problems now but it's not easy because of
difficulties multiplexing keyboard I/O and sockets I/O on Windows.
Still, we're optimistic that we will have a fix in the next release,
which will be 1.1rc1.

> One other question -- what do I have to do to view the contents of
> stdout and stderr for a program that is being debugged?

This depends on whether you're using Linux or Windows and how you've
set the debug.use-xterm preference.

On Windows, version 1.1b8-1 always brings up a dos console in which the
debug process' stdout/err should be visible.  This is also where you
should see prompts for input if your debug process does keyboard input.

On Linux, you can control whether or not an xterm is created for the debug
process with the debug.use-xterm pref.  When this is false, I/O happens in
the xterm from which Wing was launched (if it was launched via menu or
task bar, this is a problem because you won't see output and input will
happen from nowhere).

By the way, our development sources have already changed the above so that
you can also use debug.use-xterm on Windows and so that this default can
be overridden on a per-file basis along with other debug properties.

Hope that helps.  If I've misinterpreted your report, please let me know.

Thanks,

- Stephan






Run by Mailman v 2.0.8


Copyright (c) 2000-2002, Archaeopteryx Software, Inc.
Legal Statements