Open aivarannamaa opened 6 years ago
Original comment by meingraham (Bitbucket: meingraham GitHub: meingraham ).
Aivar,
I wouldn't say "change the code" as much as execute the same code, but change a value of a variable so the code evaluates the result differently.
This type of capability is relatively common with many debuggers I've used in my career... but they've all been for compiled programming languages. I don't have a computer science background. Perhaps doing this with an interpreted language is not possible. If not, then that's just the way it is. Too bad for me ;-)
Anyway, good luck with researching this capability.
Regards.
Looks like I misunderstood you then. Stepping back and changing the variables should be more feasible than stepping back and changing the code. I believe it should be even easier in a dynamic language.
I'll look into this when stepping back gets implemented.
Issue #399 was marked as a duplicate of this issue.
If #1073 ever gets implemented it would allow users to change variables while debugging, though maybe not in the most user-friendly way. Having a variable editor GUI would still be a nice addition.
If a user enters a new variable value, how is it interpreted? Is it like a Python expression? In that case, I could e.g. make a list variable by entering [1, 2, "foobar"]
.
Today I find it unlikely that this feature ever gets implemented in Thonny. It's technically hard and IMO not so useful.
Discussion: http://thonny.org/blog/2017/06/11/version_2_1_10.html#comment-3766256725