0

Debugger

Can I somehow run a debugger on sololearn to know exactly white step went wrong? Like step by step? As supposed to by debug./(Name of the directory)

24th Mar 2024, 5:18 PM
Baljeet Singhnarde
Baljeet Singhnarde - avatar
3 odpowiedzi
+ 4
what you can try is an external program running on a website: (python tutor) https://pythontutor.com/render.html#mode=edit you can copy your code from playground and paste it in the editor of this site. then you can step forward or backward through this code using navigation buttons and observe the values of variables. the following is a sample with a short code (no worry about this link). just try it https://pythontutor.com/render.html#code=inp%20%3D%20input%28%29%0Avow_count%20%3D%200%0Afor%20char%20in%20inp%3A%0A%20%20%20%20if%20char.lower%28%29%20in%20'aeiou'%3A%0A%20%20%20%20%20%20%20%20vow_count%20%2B%3D%201%0Aprint%28vow_count%29&cumulative=false&curInstr=0&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=311&rawInputLstJSON=%5B%22lothar%22%5D&textReferences=false
24th Mar 2024, 8:01 PM
Lothar
Lothar - avatar
+ 1
No
24th Mar 2024, 5:38 PM
A͢J
A͢J - avatar
+ 1
Baljeet Singhnarde , I'll add weight to Lothar's suggestion. I first learned about https://pythontutor.com in a podcast interview of the people (some school teachers) who created it. What I like about it, besides being able to step forward and backward (a nice trick they implemented by running the program and logging all the changes to a separate file that you then step through after the program ends), is the automated illustrations on the right with the arrows. Those arrows correctly reflect some essential Python concepts that are not taught on Sololearn, nor on Mimo, about how names and values (identifiers and objects) actually work in Python. The typical analogy, "a variable is a box that holds a value," is insufficient to describe it. This is the best video about Python names and values I've found so far: https://m.youtube.com/watch?v=_AEJHKGk9ns&feature=youtu.be
25th Mar 2024, 6:57 PM
Rain
Rain - avatar