diff options
author | ymzcdg <49898694+ymzcdg@users.noreply.github.com> | 2019-05-03 13:21:06 +0800 |
---|---|---|
committer | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2019-05-02 22:21:06 -0700 |
commit | db440f3e75f1d71e2c26499c7c7500cc48020047 (patch) | |
tree | 8fd186e2889a52f80b3e9eb50cb53ff6abf06bd5 /docs/zh-cn/newbs_testing_debugging.md | |
parent | 7e655a207e58fb8e5c7d76bd5727558e6b4c8b0c (diff) | |
download | qmk_firmware-db440f3e75f1d71e2c26499c7c7500cc48020047.tar.gz qmk_firmware-db440f3e75f1d71e2c26499c7c7500cc48020047.zip |
translate the first unit(newbs) (#5753)
translate
newbs_getting_started.md
newbs_building_firmware.md
newbs_flashing.md
newbs_testing_debugging.md
newbs_best_practices.md
newbs_learn_more_resources.md
into Mandarin Chinese
Diffstat (limited to 'docs/zh-cn/newbs_testing_debugging.md')
-rw-r--r-- | docs/zh-cn/newbs_testing_debugging.md | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/docs/zh-cn/newbs_testing_debugging.md b/docs/zh-cn/newbs_testing_debugging.md new file mode 100644 index 000000000..824f94b90 --- /dev/null +++ b/docs/zh-cn/newbs_testing_debugging.md | |||
@@ -0,0 +1,43 @@ | |||
1 | # 测试和调试 | ||
2 | |||
3 | 使用自定义固件刷新键盘后,您就可以测试它了。如果您幸运,一切都会完美运行,但如果没有,这份文件将帮助您找出问题所在。 | ||
4 | |||
5 | ## 测试 | ||
6 | |||
7 | 测试键盘通常非常简单。按下每一个键并确保它发送的是您期望的键。甚至有一些程序可以帮助您确保没有任何键失效。 | ||
8 | |||
9 | 注意:这些程序不是由QMK提供或认可的。 | ||
10 | |||
11 | * [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (仅Windows) | ||
12 | * [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (仅Mac) | ||
13 | * [Keyboard Tester](http://www.keyboardtester.com) (网页版) | ||
14 | * [Keyboard Checker](http://keyboardchecker.com) (网页版) | ||
15 | |||
16 | ## 使用QMK工具箱进行调试 | ||
17 | |||
18 | [QMK工具箱](https://github.com/qmk/qmk_toolbox) 将会在你的`rules.mk`中有`CONSOLE_ENABLE = yes`的时候显示你键盘发来的消息。 默认情况下,输出极为有限,不过您可以打开调试模式来增加输出信息量。使用你键盘布局中的`DEBUG`键码,使用 [命令](feature_command.md) 特性来使能调试模式, 或者向你的布局中添加以下代码。 | ||
19 | |||
20 | ```c | ||
21 | void keyboard_post_init_user(void) { | ||
22 | // Customise these values to desired behaviour | ||
23 | debug_enable=true; | ||
24 | debug_matrix=true; | ||
25 | //debug_keyboard=true; | ||
26 | //debug_mouse=true; | ||
27 | } | ||
28 | ``` | ||
29 | |||
30 | <!-- 需要修改之处:这里要添加调试回显。 --> | ||
31 | |||
32 | ## 发送您自己的调试消息 | ||
33 | |||
34 | 有时用[custom code](custom_quantum_functions.md)发送自定义调试信息很有用. 这么做很简单. 首先在你文件头部包含`print.h`: | ||
35 | |||
36 | #include <print.h> | ||
37 | |||
38 | 之后,您可以使用一些不同的打印功能: | ||
39 | |||
40 | * `print("string")`: 打印简单字符串. | ||
41 | * `uprintf("%s string", var)`: 打印格式化字符串 | ||
42 | * `dprint("string")`: 仅在调试模式使能时打印简单字符串 | ||
43 | * `dprintf("%s string", var)`: 仅在调试模式使能时打印格式化字符串 | ||