1# Debugging Assistant Usage 2 3The common event and notification module provides debugging tools to facilitate your application development. With these tools, you can view common event and notification information, publish common events, and more. These tools have been integrated with the system. You can run related commands directly in the shell. 4 5### cem Debugging Assistant 6 7##### publish 8 9* Functionality 10 11 Publishes a common event. 12 13* Usage 14 15 `cem publish [<options>]` 16 17 The table below describes the available options. 18 19 | Option | Description | 20 | ------------ | ------------------------------------------ | 21 | -e/--event | Indicates the name of the common event to publish. Mandatory. | 22 | -s/--sticky | Indicates that the common event to publish is sticky. Optional. By default, non-sticky events are published.| 23 | -o/--ordered | Indicates that the common event to publish is ordered. Optional. By default, non-ordered events are published. | 24 | -c/--code | Indicates the result code of the common event. Optional. | 25 | -d/--data | Indicates the data carried in the common event. Optional. | 26 | -h/--help | Indicates the help Information | 27 28* Example 29 30 `cem publish --event "testevent"` 31 32 Publish a common event named **testevent**. 33 34  35 36 37 38 `cem publish -e "testevent" -s -o -c 100 -d "this is data" ` 39 40 Publish a sticky, ordered common event named **testevent**. The result code of the event is **100** and the data carried is **this is data**. 41 42  43 44##### dump 45 46* Functionality 47 48 Displays information about common events. 49 50* Usage 51 52 `cem dump [<options>]` 53 54 The table below describes the available options. 55 56 | Option | Description | 57 | ---------- | -------------------------------------------- | 58 | -a/--all | Displays information about all common events that have been sent since system startup.| 59 | -e/--event | Displays information about a specific event. | 60 | -h/--help | Displays the help information. | 61 62* Example 63 64 `cem dump -e "testevent"` 65 66 Display information about the common event testevent. 67 68  69 70##### help 71 72* Functionality 73 74 Displays the help information. 75 76* Usage 77 78 `cem help` 79 80* Example 81 82  83 84 85 86### anm Debugging Assistant 87 88##### dump 89 90* Functionality 91 92 Displays information about notifications. 93 94* Usage 95 96 `anm dump [<options>]` 97 98 The table below describes the available options. 99 100 | Option | Description | 101 | ---------------- | ---------------------------------------- | 102 | -A/--active | Displays information about all active notifications. | 103 | -R/--recent | Displays information about the recent notifications. | 104 | -D/--distributed | Displays information about distributed notifications from other devices. | 105 | --setRecentCount | Indicates the number of the cached recent notifications to be displayed. Optional.| 106 | -h/--help | Displays the help information. | 107 108* Example 109 110 `anm dump -A` 111 112 Displays information about all active notifications. 113 114  115 116 117 118 `anm dump --setRecentCount 10` 119 120 Set the number of the cached recent notifications to be displayed to 10. 121 122##### help 123 124* Functionality 125 126 Displays the help information. 127 128* Usage 129 130 `anm help` 131 132* Example 133 134  135