Debugger plans?

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
mikaeleiman
Posts: 3
Joined: Wed Dec 02, 2015 1:30 pm

Debugger plans?

Post by mikaeleiman » Wed Dec 02, 2015 2:53 pm

Hi,

I've looked around for plans on adding support for debugging Python code when running Micropython, but didn't find a whole lot other than someone saying "that's worth discussing" here on the forum.

Are there any plans?

stijn
Posts: 735
Joined: Thu Apr 24, 2014 9:13 am

Re: Debugger plans?

Post by stijn » Thu Dec 03, 2015 8:27 am

Can't speak for the authors but I think there's more important work to do at the moment, debugging might not fit in the 'Micro' spirit, and it might not really be needed: in most cases a little bit of knowledge of uPy's internals and knowing how to use your favourite C debugger are just as good, if not better, than an actual python debugger.

mikaeleiman
Posts: 3
Joined: Wed Dec 02, 2015 1:30 pm

Re: Debugger plans?

Post by mikaeleiman » Thu Dec 03, 2015 8:33 am

Stepping through the VM is a terribly inefficient way to debug Python code, though… Being able to inspect the current state of variables when something unexpected happens is very handy for figuring out what's gone wrong, as is being able to set a breakpoint at a suspect position in the code and stepping ahead to see what causes something bad.

It's especially useful in embedded applications, the real world (as in chip peripherals, hardware-specific behavior etc) tends to be different from simulated test cases that are supposed to verify the code's correctness.

jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

Re: Debugger plans?

Post by jickster » Thu Sep 28, 2017 10:06 pm

mikaeleiman wrote:Hi,

I've looked around for plans on adding support for debugging Python code when running Micropython, but didn't find a whole lot other than someone saying "that's worth discussing" here on the forum.

Are there any plans?
Ping. Any updates?

jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

Re: Debugger plans?

Post by jickster » Fri Sep 29, 2017 7:12 pm

stijn wrote:Can't speak for the authors but I think there's more important work to do at the moment, debugging might not fit in the 'Micro' spirit, and it might not really be needed: in most cases a little bit of knowledge of uPy's internals and knowing how to use your favourite C debugger are just as good, if not better, than an actual python debugger.
But what if your product is an integration of uPy in an embedded system that uses uPy to do automation?
You would not want the user to care about the internals, only about the Python script.

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

Re: Debugger plans?

Post by mattyt » Sat Sep 30, 2017 12:30 am

Issue 3009 discusses PDB integration. In short, it's not trivial but it is possible, particularly for someone with the appropriate experience.

Post Reply