I'm trying to use Thonny and ESP for an educational prupose and I noticed that debugging seems dissabled and the "variable window" don't show any variable of my scripts. And this features would be nice for newbies.
I read somewhere in this forum that micropython don't support debugging, is this true? Any way to do something similar?
And about the "variables" window in thonny, is not supported either? I only read (bdev, gc and uos) variables in it and new variables introduced by terminal.
BTW where I can find these information? I tried to find it in micropython website or Thonny website with no luck.
Thanks in advance for your time
Thonny: view variables and debugging
- aivarannamaa
- Posts: 171
- Joined: Fri Sep 22, 2017 3:19 pm
- Location: Estonia
- Contact:
Re: Thonny: view variables and debugging
Debugging isn't supported, because MicroPython lacks some required featured for this.
Regarding variables table -- it is supposed to show all global variables which don't start with an underscore. Can you bring a specific example, where some variables are present in globals() but not shown in the table?
Regarding variables table -- it is supposed to show all global variables which don't start with an underscore. Can you bring a specific example, where some variables are present in globals() but not shown in the table?
Aivar Annamaa
https://thonny.org
https://thonny.org
Re: Thonny: view variables and debugging
Thanks for your prompt response.aivarannamaa wrote: ↑Sat May 01, 2021 6:57 pmDebugging isn't supported, because MicroPython lacks some required featured for this.
Regarding variables table -- it is supposed to show all global variables which don't start with an underscore. Can you bring a specific example, where some variables are present in globals() but not shown in the table?
About the variables table I didn't know about need to be global and without underscore, thanks!.
Unluckily seems to be not working for me. Maybe I'm misunderstanding something...
I tried version 3.3.3 and 3.3.7
Thanks!
- aivarannamaa
- Posts: 171
- Joined: Fri Sep 22, 2017 3:19 pm
- Location: Estonia
- Contact:
Re: Thonny: view variables and debugging
From the screenshot I see that you have stopped your program with Stop/Restart button. This button, besides interrupting the program, does soft reboot for MicroPython's VM. That's why you don't see the globals defined in your program. If you want to simply interrupt your program then use Ctrl+C
Aivar Annamaa
https://thonny.org
https://thonny.org
Re: Thonny: view variables and debugging
It was that, thanks a lot for your time!aivarannamaa wrote: ↑Sun May 02, 2021 5:15 amFrom the screenshot I see that you have stopped your program with Stop/Restart button. This button, besides interrupting the program, does soft reboot for MicroPython's VM. That's why you don't see the globals defined in your program. If you want to simply interrupt your program then use Ctrl+C