Page 1 of 1

Good micropython IDE to debug on linux ?

Posted: Wed Feb 05, 2020 8:04 pm
by Dr.Methyl
Hi,

I am a newbie and I am looking for a IDE with the debug tool to work on micropython pyboard lite and ESPs.

Everything I tried the debug tools with an IDE, it tells me it cant find the librairies...

I tired to install the uPycraft but its only for Ubuntu 16 and I have 18. It cannot run... I also tried to compile from source but does not work :(

thnx in advance

DrMe

Re: Good micropython IDE to debug on linux ?

Posted: Wed Feb 05, 2020 8:33 pm
by jedie
I used pycharm and Thonny

Re: Good micropython IDE to debug on linux ?

Posted: Wed Feb 05, 2020 9:00 pm
by jimmo
Might be worth clarifying what you mean by "debug tools". There is no line by line debugger for MicroPython (like pdb or gdb).

But if you're looking for tools like a way to deploy code or access the serial console, then yeah upycraft, thonny, pycharm etc.
I use sublime text with a combination of pyboard.py, miniterm.py and rshell.
Dr.Methyl wrote:
Wed Feb 05, 2020 8:04 pm
Everything I tried the debug tools with an IDE, it tells me it cant find the librairies...
Which IDE? What libraries?
Dr.Methyl wrote:
Wed Feb 05, 2020 8:04 pm
I tired to install the uPycraft but its only for Ubuntu 16 and I have 18. It cannot run... I also tried to compile from source but does not work
What didn't work? Was there a compiler error?

Re: Good micropython IDE to debug on linux ?

Posted: Sun Feb 16, 2020 1:44 pm
by Dr.Methyl
Which IDE? What libraries?
Hello maybe I don't speak correctly but when I start the debug tool from an IDE it tells me that it can't find the module "machine" for example. At the first line of code where its written "import machine" .
What didn't work? Was there a compiler error?
Concerning the compilation of upycraft : the compiler gives me an error because it needs the zlib version x.x and it can't find it in ubuntu 18. The main problem is I installed all zlib packages and I have higher version of zlib and the compiler needs the exact version x.x of zblib. I tried the backport but I don't want to mess up with old packages ...

Precompiled program from github gave me the same error...

Does anyone tried and succeed to make it working on Ubuntu 18 ?

Re: Good micropython IDE to debug on linux ?

Posted: Sun Feb 16, 2020 11:46 pm
by jimmo
Dr.Methyl wrote:
Sun Feb 16, 2020 1:44 pm
Hello maybe I don't speak correctly but when I start the debug tool from an IDE it tells me that it can't find the module "machine" for example. At the first line of code where its written "import machine" .
This is likely because it's trying to run the code in regular Python, not on the actual device.

Re: Good micropython IDE to debug on linux ?

Posted: Wed Feb 19, 2020 6:44 pm
by Dr.Methyl
jimmo wrote:
Sun Feb 16, 2020 11:46 pm
Dr.Methyl wrote:
Sun Feb 16, 2020 1:44 pm
Hello maybe I don't speak correctly but when I start the debug tool from an IDE it tells me that it can't find the module "machine" for example. At the first line of code where its written "import machine" .
This is likely because it's trying to run the code in regular Python, not on the actual device.
Yes exactly tha't is why i am asking for a good IDE :)

Do you know which on I can use on linux ? Or if I can add a plugin for regular python IDE ?

Re: Good micropython IDE to debug on linux ?

Posted: Thu Feb 20, 2020 3:07 am
by jimmo
Thonny seems to be talked about a lot, and it's made specifically for MicroPython. I have not tried it myself but it seems to do the things you're looking for.

There's also a MicroPython plugin for PyCharm.

And for micro:bit and ESP8266/ESP32 there's Mu (https://codewith.mu/). It's should be a simple patch to get it working with Pyboard and everything else, it just needs to have the USB VID/PID configured.

Hopefully some other people will have more suggestions. I so much more prefer to use a simple editor (Sublime Text), and then a terminal sitting next to it with pyboard.py/mpreplfs.py or rshell running.

Re: Good micropython IDE to debug on linux ?

Posted: Thu Feb 20, 2020 7:24 am
by mattyt
I'm a happy Visual Studio Code user. The Python and Magic Python extensions provide good Python support and excellent syntax highlighting.

On my radar is to use MicroPython Stubber and Micropy CLI both of which can help improve Intellisense. I've tried them out - and they look promising! - but haven't used them 'in anger' yet...

MicroPython IDE? Unconvinced.

Posted: Thu Feb 20, 2020 8:23 am
by pythoncoder
I'm with @jimmo on this one. MicroPython lacks a debugger. To me the principal benefit of an IDE is a tightly integrated visual debugger, and (alas) you aren't going to get that. So what does an IDE offer that you don't get with a really good programmer's editor and rshell?

People will debate editors forever; I use Kate. This supports multiple projects each with multiple files and has a great range of features and plugins designed for programmers. With Kate and my version of rshell with macros I'd need a lot of convincing to change to an IDE.

FWIW I do have extensive experience of using IDE's. With the right debug support they are great...