Add support for PDB debugging module
Hello,
I'd like to see support for debugger in Micropython. I know it has been discussed before, but I cannot find any conclusion on that topic from Micropython team. Is even possible to implement PDB support in current Micropython codebase?
If so, what is needed to make it happen? Do the project need more manpower for this task or is it matter of priority or money?
Feature suggestion; Triggering Repl in handler decorator
A very low-priority feature request;
Trying to approach 'debugging' some code intended for Micropython on the ESP8266. I was thinking to run the code in Python3 on my laptop with stubs emulating the ESP8266 to prove functionality, then transfer to the ESP8266 module when I want to prove it for real, assuming that I have eliminated any major bugs and allowing final tweaks.
However, another approach occurred to me, though it may be beyond my skills with micropython currently.
Alternative - an Interactive REPL decorator
In the absence of pdb support in micropython, it might be useful to be able to decorate arbitrary handlers so that the REPL is launched with access to the args and kwargs when the decorated function is called.
The user of the interactive prompt must then 'return' a function for execution to continue, (although a method based on 'raise' passing back the function might be more appropriate for interactively quitting since 'return' is invalid in a REPL).
Stock functions could be provided in locals (e.g. operations 'raising' functions to return fixed values, operations 'raising' a function to defer to the original handler). Importantly, all local values could be inspected and functions 'test-run' interactively in the context to see what they will do.
Does this make any sense at all? Is there a core problem with asynchrony which makes this 'hiding' of a REPL inside a function actually impossible?
How could this be approached? I note there is support in python 3 via https://docs.python.org/3/library/code.html but not sure if this applies to micropython or how to get access to the REPL 'tty' streams elegantly to wire in an interactive interpreter when the decorator is invoked.