harmony 鸿蒙devicedebug

  • 2025-06-12
  • 浏览 (4)

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 鸿蒙Debugging Tools

harmony 鸿蒙Ability Assistant

harmony 鸿蒙Account Manager

harmony 鸿蒙Advanced Notification Manager

harmony 鸿蒙App Check Tool

harmony 鸿蒙Access Token Manager

harmony 鸿蒙Bundle Manager

harmony 鸿蒙Common Event Manager

harmony 鸿蒙EDM

harmony 鸿蒙LLDB

0  赞