Embedded python: How to debug code in an isolated way

Chris Angelico rosuav at gmail.com
Mon Aug 24 16:32:30 EDT 2020


On Tue, Aug 25, 2020 at 6:30 AM Schachner, Joseph
<Joseph.Schachner at teledyne.com> wrote:
>
> Another suggestion:  If your Python code only references  few things outside of itself, make a simulated environment in Python on your PC, so that you can run your embedded code after importing your simulated environment, which should supply the functions it expects to call and variables it expects to access.
>
> Then you can use any PC based debugger (PyScripter, Jetbrains' PyCharm, Visual Studio with Python support, etc) to debug in the simulated environment.
>

That seldom works very well. since most of the point of running code
on embedded devices is to use the features of those devices. My
brother built a network-attached doorbell on an RPi, and all the
debugging work revolved around the exact electrical signals on the
GPIO pins.

ChrisA


More information about the Python-list mailing list