Updated Debugging using printf (markdown)

Philipp AUER 2022-12-06 16:04:12 +01:00
parent 8534abf62b
commit bfedaa6c8a

@ -44,6 +44,10 @@ Since `AGBPrintf` is not widely supported by emulators it is recommended to use
In order to view our logs, we'll need to use the [mGBA](https://mgba.io/) emulator. Open the log viewer by going to the "Tools" menu and selecting "View Logs...". Make sure the log level checkboxes for INFO, WARNING, ERROR are checked and run your game until it hits a `DebugPrintf` statement.
On newer versions of mgba you may want to disable some of the verbose logging to actually see your output over the rest of the log spam. Go to `Tools->Settings->Logging` and disable whatever is spamming your log:
![image](https://user-images.githubusercontent.com/3799173/205947790-d5035fda-0109-44dc-a7cb-35aacb9b27cb.png)
## 5. Configuration
Apart from enabling debugging you can also change the `LOG_HANDLER` and the `PRETTY_PRINT_HANDLER`. See the comments in `include/config.h`. Note that when using LIBC as your `PRETTY_PRINT_HANDLER` it was discovered that the devkitPro libc does not link well against it and it does not support the `%S` format extension.