Updated Debugging (markdown)

Neil Dorin
2022-01-07 15:36:46 -07:00
parent a5f7c0508a
commit a9cbd37df4

@@ -59,12 +59,44 @@ Debug.Console(0, Debug.ErrorLogLevel.Notice, "Hello World");
## Console Commands
### General Console Commands
Below are is a non-exhaustive list of some of the Essentials specific console commands that allow interaction with the application at runtime.
### `help user`
Will print the available console commands for each program slot. Console commands can be added and removed dynamically by Essentials and may vary by the version of Essentials that is running. This is the best place to start to determine the available commands registered for each instance of Essentials running on a processor.
### `reportversions:[slot]`
Will print the running versions of all .dll libraries. Useful for determining the exact build version of the Essentials application and all plugins
### `gettypes:[slot] [searchString(optional)]`
The `searchString` value is an optional parameter to filter the results.
Will print all of the valid `type` values registered in the `DeviceFactory` for the running Essentials application. This helps when generating config structure and defining devices. Device types added by plugins will also be shown.
### `showconfig:[slot]`
Will print out the merged config object
### `donotloadonnextboot:[slot] [true/false]`
When the value is set to true, Essentials will pause when starting up, to allow for a developer to attach to the running process from an IDE for purposes of step debugging. Once attached, issuing the command `go:[slot]` will cause the configuration file to be read and the program to initialize. This value gets set to false when the `go` command is issues.
### DeviceManager Console Commands
The following console commands all perform actions on devices that have been registered with the `PepperDash.Essentials.Core.DeviceManager` static class
### Appdebug:[slot][0-2]
### `Appdebug:[slot][0-2]`
Gets or sets the current debug level where 0 is the lowest setting and 2 is the most verbose
### `getjoinmap:[slot] [bridgeKey][deviceKey (optional)]
For use with SIMPL Bridging. Prints the join map for the specified bridge. If a device key is specified, only the joins for that device will be printed.
Example:
```sh
@@ -75,7 +107,7 @@ RMC3>appdebug:1 1 // Sets level to 1 (all messages level 1 or lower will print)
RMC3>[Application 1], Debug level set to 1
```
### Devlist:[slot]
### `Devlist:[slot]`
Gets the current list of devices from `DeviceManager`
@@ -117,7 +149,7 @@ RMC3>[16:34:05.819]App 1:28 Devices registered with Device Mangager:
[16:34:05.848]App 1: [tcp-1] Generic TCP 1
[16:34:05.849]App 1: [tcp-1-tcp]
```
### Setdevicestreamdebug:[slot][devicekey][both/rx/tx/off]
### `Setdevicestreamdebug:[slot][devicekey][both/rx/tx/off]`
Enables debug for communication on a single device
@@ -131,7 +163,7 @@ PRO3>setdevicestreamdebug:1 lights-1-com both
PRO3>setdevicestreamdebug:1 lights-1-com off
```
### Devprops:[slot][devicekey]
### `Devprops:[slot][devicekey]`
Gets the list of public properties on the device with the corresponding `deviceKey`
@@ -176,7 +208,7 @@ RMC3>
```
### Devmethods:[slot][devicekey]
### `Devmethods:[slot][devicekey]`
Gets the list of public methods available on the device
@@ -219,7 +251,7 @@ RMC3>devmethods:1 cec-1-cec
RMC3>
```
### Devjson:[slot][json formatted object {"devicekey", "methodname", "params"}]
### `Devjson:[slot][json formatted object {"devicekey", "methodname", "params"}]`
Used in conjunction with devmethods, this command allows any of the public methods to be called from console and the appropriate arguments can be passed in to the method via a JSON object.