1# Debugging Tool Writing Template 2 3## General Writing Instructions 4> **NOTE** 5> 6> Delete all writing instructions after you finish the writing. 7 8The introduction to the debugging tool should focus on detailed description, aiming to comprehensively demonstrate each debugging and optimization command supported by the debugging tool to developers, ensuring that no command is omitted and not briefly summarized. 9 10# Document Title 11> *Writing Instructions* 12> - **Document title**: Use a scenario-based phrase of the debugging tool as the document title. Retain the original tool name for easy understanding and direct use. 13> - **Heading levels**: Use the document title as the level-1 heading, which is prefixed with `#` followed by a space. Use the environment requirements, command list, specific command description, and error codes (optional) as level-2 headings, which are prefixed with `##` followed by a space. 14 15Describe the tool, including its definition, capabilities, and use scenarios. 16 17**Example**: Bundle Manager (bm) 18 19Bundle Manager (bm) is a tool for installing, uninstalling, updating, and querying bundles. It provides basic capabilities for debugging application installation packages. 20 21## Environment Setup 22 23> *Writing Instructions* 24> 25> Describe the running environment of the tool according to the actual situation. 26 27Describe the environment requirements for using the tool. 28 29 30**Example**: Environment Setup 31 32Before using this tool, you must obtain [hdc](../../application-dev/dfx/hdc.md) and run the **hdc shell** command. 33 34 35## Commands 36> *Writing Instructions* 37> - To obtain the command list, run the ***xx* -h** or ***xx* -help** command. 38> - List each command in the return value in the table, with **help/-h** listed in the first line, and other commands arranged according to their usage frequency. 39 40|Command|Description| 41|----|--------| 42|help/-h|Help command, which is used for ****.| 43|...|......| 44 45 46**Example** 47### bm Commands 48| Command| Description| 49| -------- | -------- | 50| help | Displays the commands supported by the bm tool.| 51| install | Installs a bundle.| 52| uninstall | Uninstalls a bundle.| 53| dump | Displays bundle information.| 54| clean | Clears the cache and data of a bundle. This command is available in the root version. It is also available in the user version with developer mode enabled. It is unavailable in other cases.| 55| enable | Enables a bundle. A bundle can be used after being enabled. This command is available in the root version but not in the user version.| 56|...|...| 57 58 59## *ExampleCommand* Command 60>*Writing requirements* 61> - Command usage: Contain every parameter in the return value of ***xx xxxx* help/-h**. 62> - Command parameter list: Describe each parameter supported by the current command based on the return value of ***xx xxxx* help/-h**. In addition, describe whether it is mandatory and its use scenario. Place **help/-h** at the beginning. 63> - Example: Provide example commands based on the parameters in the command list, providing examples that cover as many as possible. 64 65```bash 66xx xxxx [h] [****] [****] 67``` 68>**NOTE**: All parameters must be listed. 69 70**Parameters of the *exampleCommand* command** 71|Parameter|Description| 72|----|--------| 73|-h|Help information.| 74|...|......| 75 76Example: 77 78```bash 79# Scenario description 80xx xxxx 81``` 82**Example:** 83## install Command 84 85```bash 86bm install [-h] [-p filePath] [-u userId] [-r] [-w waitingTime] [-s hspDirPath] 87``` 88 89 **Parameters of the install command** 90 91 92| Parameter| Description| 93| -------- | -------- | 94| -h | Displays help information.| 95| -p | Installs an HAP with other HAPs in the specified path. This parameter is mandatory.| 96| -u | Installs an HAP for a given user, which is the currently active user by default. This parameter is optional. | 97| -r | Installs an HAP in overwrite mode. This parameter is optional. By default, the HAP is installed in overwrite mode.| 98| -s | This parameter is mandatory only for HSP installation. Installs an HSP. Each directory can have only one HSP with the same bundle name. This parameter is mandatory only for HSP installation.| 99| -w | Waits for a specified time before installing a HAP. The minimum waiting time is 5s, and the maximum waiting time is 600s. The default waiting time is 5s. This parameter is optional.| 100 101 102 103 104Example 105```bash 106# Install an HAP. 107bm install -p /data/app/ohos.app.hap 108# Install an HAP in overwrite mode. 109bm install -p /data/app/ohos.app.hap -r 110# Install an HSP. 111bm install -s xxx.hsp 112# Install a HAP and its dependent HSP. 113bm install -p aaa.hap -s xxx.hsp yyy.hsp 114# Install a HAP for a specified user. The waiting time is 10s. 115bm install -p /data/app/ohos.app.hap -u 100 -w 10s 116``` 117 118> **NOTE** 119> 120> The **help** command does not have a parameter list. 121 122<!--no_check--> 123