Archaeopteryx Software, Inc.
Take Flight!Search

Wing IDE
About Us
Open Source

 Advanced Search

[wingide-users] WEP: Current line of execution

Stephan R.A. Deibel
Thu, 25 Oct 2001 09:00:55 -0400 (EDT)

On Thu, 25 Oct 2001, F. GEIGER wrote:
> Is there a chance, that a future version of WingIDE will be able to
> let me change the next line executed?
> Consider this:
> - You are in a debug session and step over a method
> - Oops, why did it return false instead of true?
> - As it took quite a while to get there, you do not want to restart the
> session to be able to step into the offending method.
> - So move the cursor to the line where this method is called and press "Next
> statement" (you know, like in MSVC++ etc.).
> - Now step into the method.
> Or is this something, which is made impossible by the Python interpreter?

You can use the Debug Probe to execute arbitrary code at the currently
selected stack frame.  I use this often in cases such as the above to see
what values already-executed code returned, esp. code that's up a few
stack frames if I'm not sure how a parameter got its value.

The limitation is that calling code from there does not reach break points
so it's not useful for stepping through the code you invoke.  That's
something that will be changed after 1.1 is finally released; it requires
semi-major refactoring of the debugger, related to supporting

Actually moving the program counter is an interesting idea worth looking
into, although I suspect allowing a seperate invocation that doesn't
replace the real run state of the program is a better solution (and may be
the only solution depending on what the Python interpreter allows). It
should be possible to select code on the source editor and have that get
invoked in the same way as the Debug Probe works, which would be useful
later when the debugger can actually step through that invocation.

Thanks for the suggestion.

- Stephan

Run by Mailman v 2.0.8

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