]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - docs/newbs_testing_debugging.md
Revert "Update build instructions and docker file to download submodules" (#5533)
[qmk_firmware.git] / docs / newbs_testing_debugging.md
index 1d8021dec8f16c32032bc24c65ee64e166ec4a47..d78311339d77fd7778d44a42632387708e5e1d81 100644 (file)
@@ -15,7 +15,17 @@ Note: These programs are not provided by or endorsed by QMK.
 
 ## Debugging With QMK Toolbox
 
-[QMK Toolbox](https://github.com/qmk/qmk_toolbox) will show messages from your keyboard if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DEBUG` keycode in your keymap, or use the [Command](feature_command.md) feature to enable debug mode.
+[QMK Toolbox](https://github.com/qmk/qmk_toolbox) will show messages from your keyboard if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DEBUG` keycode in your keymap, use the [Command](feature_command.md) feature to enable debug mode, or add the following code to your keymap.
+
+```c
+void keyboard_post_init_user(void) {
+  // Customise these values to desired behaviour
+  debug_enable=true;
+  debug_matrix=true;
+  //debug_keyboard=true;
+  //debug_mouse=true;
+}
+```
 
 <!-- FIXME: Describe the debugging messages here. -->
 
@@ -28,6 +38,6 @@ Sometimes it's useful to print debug messages from within your [custom code](cus
 After that you can use a few different print functions:
 
 * `print("string")`: Print a simple string.
-* `sprintf("%s string", var)`: Print a formatted string
+* `uprintf("%s string", var)`: Print a formatted string
 * `dprint("string")` Print a simple string, but only when debug mode is enabled
 * `dprintf("%s string", var)`: Print a formatted string, but only when debug mode is enabled