Picodebug -- a tool for debugging and logging in MicroPython scripts on Raspberry Pico and Raspberry Pico W
- Works without REPL
- Works in main.py
- Automatic rotation of logs
- Uses 8 log files of 100KB each, then automatically rotate: log1.txt, log2.txt, log3.txt, log4.txt, log5.txt, log6.txt, log7.txt, log8.txt
- All debug messages are stored, not overwritten
- Every log message is timestamped
- Output to log files and to console
- Just use
picodebug.logPrint("some log message")in your code
a. Output to log file
import picodebug
picodebug.logPrint("some log message")
b. Output to log file and console
import picodebug
picodebug.logPrint("some log message", True)
c. Output to console only
import picodebug
picodebug.logPrint("some log message", True, False)
d. Using LED for Pico W
board_led = machine.Pin("LED", machine.Pin.OUT)
picodebug.logPrint("some point", led = board_led, numberOfBlinks=2)