diff options
| author | IskandarMa <epiciskandar@gmail.com> | 2022-01-19 02:24:02 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-18 18:24:02 +0000 |
| commit | f6a7f4d4aca4a1808850e2dcd8cc223ae5202062 (patch) | |
| tree | fefc9beff20ea6438e9c1927d83319ed4c85a6b0 /docs/zh-cn/newbs_testing_debugging.md | |
| parent | 8a3dfe2246c4a6182cf18349e9c4d0d28cae4ec5 (diff) | |
| download | qmk_firmware-f6a7f4d4aca4a1808850e2dcd8cc223ae5202062.tar.gz qmk_firmware-f6a7f4d4aca4a1808850e2dcd8cc223ae5202062.zip | |
update the Chinese translation based on the latest English version (#14924)
Co-authored-by: peepeetee <43021794+peepeetee@users.noreply.github.com>
Co-authored-by: Joy Lee <chang.li@westberrytech.com>
Co-authored-by: LitoMore <LitoMore@users.noreply.github.com>
Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com>
Diffstat (limited to 'docs/zh-cn/newbs_testing_debugging.md')
| -rw-r--r-- | docs/zh-cn/newbs_testing_debugging.md | 46 |
1 files changed, 7 insertions, 39 deletions
diff --git a/docs/zh-cn/newbs_testing_debugging.md b/docs/zh-cn/newbs_testing_debugging.md index d88d9b6f2..0016d3b81 100644 --- a/docs/zh-cn/newbs_testing_debugging.md +++ b/docs/zh-cn/newbs_testing_debugging.md | |||
| @@ -1,46 +1,14 @@ | |||
| 1 | # 测试和调试 | 1 | # 测试和调试 |
| 2 | 2 | ||
| 3 | 使用自定义固件刷新键盘后,您就可以测试它了。如果您幸运,一切都会完美运行,但如果没有,这份文件将帮助您找出问题所在。 | 3 | <!--- |
| 4 | 4 | original document: 0.15.12:docs/newbs_testing_debugging.md | |
| 5 | git diff 0.15.12 HEAD -- docs/newbs_testing_debugging.md | cat | ||
| 6 | --> | ||
| 5 | ## 测试 | 7 | ## 测试 |
| 6 | 8 | ||
| 7 | 测试键盘通常非常简单。按下每一个键并确保它发送的是您期望的键。甚至有一些程序可以帮助您确保没有任何键失效。 | 9 | [已移到这里](zh-cn/faq_misc.md#testing) |
| 8 | |||
| 9 | 注意:这些程序不是由QMK提供或认可的。 | ||
| 10 | |||
| 11 | * [QMK Configurator](https://config.qmk.fm/#/test/) (网页版) | ||
| 12 | * [Switch Hitter](https://web.archive.org/web/20190413233743/https://elitekeyboards.com/switchhitter.php) (仅Windows) | ||
| 13 | * [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (仅Mac) | ||
| 14 | * [Keyboard Tester](https://www.keyboardtester.com) (网页版) | ||
| 15 | * [Keyboard Checker](https://keyboardchecker.com) (网页版) | ||
| 16 | |||
| 17 | ## 使用QMK工具箱进行调试 | ||
| 18 | |||
| 19 | [QMK工具箱](https://github.com/qmk/qmk_toolbox) 将会在你的`rules.mk`中有`CONSOLE_ENABLE = yes`的时候显示你键盘发来的消息。 默认情况下,输出极为有限,不过您可以打开调试模式来增加输出信息量。使用你键盘布局中的`DEBUG`键码,使用 [命令](feature_command.md) 特性来使能调试模式, 或者向你的布局中添加以下代码。 | ||
| 20 | |||
| 21 | ```c | ||
| 22 | void keyboard_post_init_user(void) { | ||
| 23 | // Customise these values to desired behaviour | ||
| 24 | debug_enable=true; | ||
| 25 | debug_matrix=true; | ||
| 26 | //debug_keyboard=true; | ||
| 27 | //debug_mouse=true; | ||
| 28 | } | ||
| 29 | ``` | ||
| 30 | |||
| 31 | <!-- 需要修改之处:这里要添加调试回显。 --> | ||
| 32 | |||
| 33 | ## 发送您自己的调试消息 | ||
| 34 | |||
| 35 | 有时用[custom code](custom_quantum_functions.md)发送自定义调试信息很有用. 这么做很简单. 首先在你文件头部包含`print.h`: | ||
| 36 | 10 | ||
| 37 | ```c | 11 | ## 调试 :id=debugging |
| 38 | #include "print.h" | ||
| 39 | ``` | ||
| 40 | 12 | ||
| 41 | 之,您可以使一些不的打功: | 13 | [里](zh-cn/faq_debug.md#debugging) |
| 42 | 14 | ||
| 43 | * `print("string")`: 打印简单字符串. | ||
| 44 | * `uprintf("%s string", var)`: 打印格式化字符串 | ||
| 45 | * `dprint("string")`: 仅在调试模式使能时打印简单字符串 | ||
| 46 | * `dprintf("%s string", var)`: 仅在调试模式使能时打印格式化字符串 | ||
