DebugMode
Purpose
This command sets or disables HomeSeer's built-in debugging trace functions. When enabled, debug information is written to the "\Debug Logs" directory into a separate file for each debug type enabled. A "Debug_Composite.log" file in the debug logs directory contains all debug information written in all logs, and the "Debug_Other.log" contains debugging information not categorized into one of the debug types listed below as well as the HomeSeer log entries produced during the time when debug logging is enabled. Writing debug information can add to the overall system load, so please use this under advisement from HomeSeer Technologies support personnel.
Parameters
Parameter: mode
Type: long (.NET Integer)
Description: The debug mode for HomeSeer to be set to (see below). Multiple modes can be logically OR'd together to enable several debug modes at once.
Returns
None
Example
Sample Code
Turn on debugging for script, event, and plug-ins: (1 + 2 + 128 = 131)
Sub Main()
hs.DebugMode = 131
End Sub
Debug mode can also be turned on from the the HS4 web interface by navigating to Tools > Script Commands and running the script command.
Debug Mode Values
Value | Function Trace |
---|---|
0 | Disable debugging (normal) |
1 | Script activity |
2 | Event activity |
4 | Condition checks |
8 | Device value changes |
16 | HomeSeer procedure calls |
64 | ThreadPool Calls |
128 | Plug-In Procedure calls |
256 | Database Procedure Debugging |
512 | Web/E-Mail Server Activity |
1024 | Log Voice Recognition |
2048 | Log JSON requests |