1e41f4b71Sopenharmony_ci# devicedebug工具
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_cidevicedebug工具向开发者提供对调试应用发送信号的能力,目前只支持向AMS里管理的debuggable应用进程的pid发送signal信号,达到终止对应pid进程的能力。
5e41f4b71Sopenharmony_ci
6e41f4b71Sopenharmony_ci> **说明:**
7e41f4b71Sopenharmony_ci>
8e41f4b71Sopenharmony_ci> 在使用本工具前,开发者需要先获取<!--Del-->[<!--DelEnd-->hdc工具<!--Del-->](../../device-dev/subsystems/subsys-toolchain-hdc-guide.md)<!--DelEnd-->,执行hdc shell。
9e41f4b71Sopenharmony_ci
10e41f4b71Sopenharmony_ci**表1** devicedebug工具命令列表
11e41f4b71Sopenharmony_ci
12e41f4b71Sopenharmony_ci| 命令 | 描述 |
13e41f4b71Sopenharmony_ci| -------- | -------- |
14e41f4b71Sopenharmony_ci| help/-h | 帮助命令,显示devicedebug支持的命令信息。 |
15e41f4b71Sopenharmony_ci| kill | 终止进程命令,用来终止对应pid进程。 |
16e41f4b71Sopenharmony_ci
17e41f4b71Sopenharmony_ci
18e41f4b71Sopenharmony_ci## 帮助命令
19e41f4b71Sopenharmony_ci```bash
20e41f4b71Sopenharmony_cidevicedebug help
21e41f4b71Sopenharmony_ci```
22e41f4b71Sopenharmony_ci
23e41f4b71Sopenharmony_ci**表2** help命令列表
24e41f4b71Sopenharmony_ci
25e41f4b71Sopenharmony_ci| 命令    | 描述       |
26e41f4b71Sopenharmony_ci| ------- | ---------- |
27e41f4b71Sopenharmony_ci| devicedebug help | 显示devicedebug支持的命令信息。 |
28e41f4b71Sopenharmony_ci
29e41f4b71Sopenharmony_ci示例:
30e41f4b71Sopenharmony_ci
31e41f4b71Sopenharmony_ci```bash
32e41f4b71Sopenharmony_ci# 显示帮助信息。
33e41f4b71Sopenharmony_cidevicedebug help
34e41f4b71Sopenharmony_ci```
35e41f4b71Sopenharmony_ci
36e41f4b71Sopenharmony_ci
37e41f4b71Sopenharmony_ci## 终止进程命令
38e41f4b71Sopenharmony_ci
39e41f4b71Sopenharmony_ci```bash
40e41f4b71Sopenharmony_cidevicedebug kill
41e41f4b71Sopenharmony_ci```
42e41f4b71Sopenharmony_ci用于向应用进程发送pid与signal信号,应用进程接受到信号后终止对应pid进程。
43e41f4b71Sopenharmony_ci
44e41f4b71Sopenharmony_ci**表3** kill命令列表
45e41f4b71Sopenharmony_ci  | 命令 | 描述 |
46e41f4b71Sopenharmony_ci  | -------- |-------------------|
47e41f4b71Sopenharmony_ci  | help/-h | 帮助信息。|
48e41f4b71Sopenharmony_ci  | -\<signal\> \<pid\> |  必选字段,signal为终止信号,终止pid进程。 | 
49e41f4b71Sopenharmony_ci
50e41f4b71Sopenharmony_ci
51e41f4b71Sopenharmony_ci
52e41f4b71Sopenharmony_ci示例:
53e41f4b71Sopenharmony_ci  ```bash
54e41f4b71Sopenharmony_ci  # 以终止12111进程,signal信号9为例。
55e41f4b71Sopenharmony_ci  devicedebug kill -9 12111
56e41f4b71Sopenharmony_ci  ```
57e41f4b71Sopenharmony_ci
58