harmony 鸿蒙devicedebug
devicedebug
devicedebug provides the capability of sending signals to applications for debugging purposes. Currently, signals can be sent only to processes of debuggable applications managed by AMS to terminate these processes.
NOTE
Before using this tool, you must obtain hdc and run the hdc shell command.
Table 1 devicedebug commands
Command | Description |
---|---|
help/-h | Displays the commands supported by the devicedebug tool. |
kill | Kills a process with a specified PID. |
Help Command
devicedebug help
Table 2 Help command
Command | Description |
---|---|
devicedebug help | Displays the commands supported by devicedebug. |
Example:
# Display the help information.
devicedebug help
Kill Command
devicedebug kill
Sends the signal (1-64) to a process of the debuggable application. After receiving the signal, the application terminates the corresponding process.
Table 3 Kill command parameters |Command|Description| |——–|——————-| |help/-h|Help information.| |-<signal> <pid>| signal (1-64) indicates the kill signal, which is used to kill a process of the debuggable application with a specified PID. This field is mandatory.|
Return value
If the process corresponding to the PID is a non-application process, “devicedebug: kill: {pid}: No such app process” is displayed. If the corresponding process is not a debuggable application process, “devicedebug: kill: process: {pid} is not debuggable app” is displayed.
Example:
# Kill the 12111 process using signal 9.
devicedebug kill -9 12111
你可能感兴趣的鸿蒙文章
harmony 鸿蒙Advanced Notification Manager
harmony 鸿蒙Access Token Manager
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦