how to modify code while debugging it without having to stop and then restart debugger

Steve Holden steve at holdenweb.com
Wed Nov 9 13:04:02 EST 2005


Steven D'Aprano wrote:
> On Tue, 08 Nov 2005 13:38:28 -0500, python wrote:
[...]
>>as i mentioned even micro$soft can do this using statically type languages like visual basic and csharp.
>>also, both visualbasic and csharp have goto statements, which i do to not use in final code but can be real handy when 
>>used with the ability to change debugged code on the fly while inside the function being debugged.
> 
> 
> Better and better. Yes, I can see how the ability to jump around a
> function on the fly would really help you understand how the function is
> supposed to work when you take the gotos out.
> 
I must admit I had been wondering just how far the OP wanted to go in 
mangling the code. I suspect that the interesting bit to the OP is 
having a visual editor available to alter functions and class 
definitions "on the fly" rather than having to completely re-enter the 
definition as you would at the interactive interpreter prompt. He or 
she'd probably be a bit unhappy about the need to reload() modules too, 
I suppose.
> 
> 
> 
>>for example,
>>if i am inside a function and there is some an error on a line and that is where the debugger is currently pointing at,
>>i simple copy and paste the bad code line just below the actual code line.
>>i fix this copied code line.
>>then i just turn the bad line into a comment line and the debugger will move the current focus to the next time, which 
>>is the fixed code.
>>
>>how can such a dynamic language like python not be able to do this.
> 
> 
> Do you try to ignore the syntax and grammar of the programming language
> you are coding in too, or only English?
> 
That's rather unkind. I'd judge we are plainly dealing with someone who 
is working hard to express questions in a foreign language. Funny, 
perhaps, but definitely unkind. Take two demerits and smack yourself on 
the wrist.

>>>there are several applications that can do this.
>>>in fact, the free version of the visual studio 2005, which is free, have this ability.
> 
> 
> Just out of curiosity, how much is the free version of Visual Studio 2005?
> 
> 
I'm not positive, but i think they're currently giving it away.

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC                     www.holdenweb.com
PyCon TX 2006                  www.python.org/pycon/




More information about the Python-list mailing list