Debug will output most of the useful state to the console. This can be enable in your firmware by setting this in your keymap. NOTE that it will be slower, so only enable this when you need debugging.
keyboard.debug_enabled = True
The output can be viewed by connecting to the serial port of the keybord. Please refer to THIS for more information when connecting to serial console. For Linux users, we recommend picocom or screen