Good micropython IDE to debug on linux ?

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
Dr.Methyl
Posts: 3
Joined: Wed Feb 05, 2020 7:56 pm

Good micropython IDE to debug on linux ?

Post by Dr.Methyl » Wed Feb 05, 2020 8:04 pm

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


User avatar
jimmo
Posts: 1440
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Good micropython IDE to debug on linux ?

Post by jimmo » Wed Feb 05, 2020 9:00 pm

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?

Dr.Methyl
Posts: 3
Joined: Wed Feb 05, 2020 7:56 pm

Re: Good micropython IDE to debug on linux ?

Post by Dr.Methyl » Sun Feb 16, 2020 1:44 pm

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 ?

User avatar
jimmo
Posts: 1440
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Good micropython IDE to debug on linux ?

Post by jimmo » 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.

Dr.Methyl
Posts: 3
Joined: Wed Feb 05, 2020 7:56 pm

Re: Good micropython IDE to debug on linux ?

Post by Dr.Methyl » Wed Feb 19, 2020 6:44 pm

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 ?

User avatar
jimmo
Posts: 1440
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Good micropython IDE to debug on linux ?

Post by jimmo » Thu Feb 20, 2020 3:07 am

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.

User avatar
mattyt
Posts: 275
Joined: Mon Jan 23, 2017 6:39 am

Re: Good micropython IDE to debug on linux ?

Post by mattyt » Thu Feb 20, 2020 7:24 am

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...

User avatar
pythoncoder
Posts: 4030
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

MicroPython IDE? Unconvinced.

Post by pythoncoder » Thu Feb 20, 2020 8:23 am

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...
Peter Hinch

Post Reply