Re: Debugging skills

Mats Wichmann <[email protected]> Sat, 6 Jan 2024 08:36:21 -0700
Newsgroups gmane.comp.python.tutor
Message-ID <[email protected]>
On 1/5/24 15:14, Roel Schroeven wrote:
> Mats Wichmann schreef op 5/01/2024 om 14:56:
>> while we're nattering on a whole range of sort-of-debugging topics,
>> here's something I've occasionally wondered about, when a beginner has
>> written something that makes sense only to them, not to the Python
>> interpreter.  Regexes are confusing, so there are several websites (see
>> for example regex101.com) where you can enter your "code" (regex) and as
>> it's interpreted, will show you an explanation in words in a separate
>> pane.  Does anyone know if there's a similar thing for Python code?
>> "This is what you wrote actually means to the interpreter".  Ones I know
>> about (like at Programiz, w3schools, online-python) don't attempt the
>> explanation part.  It's not something that's likely to be useful for
>> very many cases, but I could see where in the beginning there might be
>> some benefit...
> 
> Python Tutor goes a bit in that direction, though not nearly as far as 
> those regex websites.
> 
> https://pythontutor.com/python-compiler.html
> 
> I think it's mostly useful to visualize how recursion works.

hey thanks - there are actually cases where that could be useful. yes, 
you have to step through it like in a debugger, but since it shows all 
the interesting variables updating as you go (pdb is somewhat limited in 
this regard), it makes a nice visual of what's going on. I'll keep track 
of that one for my toolbox of recommendations :-)


_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor