Debugging python code

Hello there!
I am currently trying to take full advantage of the fact that the keyboard runs python, but I struggle a bit each time I make a mistake to figure out where the mistake is. Does anyone know if there is a way to see any log output or anything of the sorts that could help me pin point where I made the mistake?

Hi, you can enter the REPL mode through the serial port to see the log.

Thank you for the reply. I was hoping there was a way to push out a debug file to the drive like to boot file is currently. At least I know it isn’t possible.

Just to add, I must admit I didn’t pick up on the fact that the keyboard pops up as a serial device and all you need to do is connect a terminal emulator to the serial port, then you can get access to REPL and see everything that is going on and why something isn’t working. This is great so in case anyone in the future would like to know all you need to do is connect to the right device port and you can see any error messages by the keyboard with if you have the keyboard.verbose = True statement in your code.py.