OpcCmd Utility Tips and Tricks

From OPC Labs Knowledge Base
Displaying exception information from an event
If a command produces events that contain errors, you may want to display the details of the exception information related to particular event in a nicely formatted way, analogically to what the error? (shortened: er?) command does. To do so, determine the index eventIndex of the event in the sequence, and then enter the following command: events? eventIndex --!extractMember EventArgs.ErrorDescendInfos (shortened: ev? eventIndex -!xm EventArgs.ErrorDescendInfos). The resulting table starts with a row for the outmost exception, and the subsequent row(s) contain the inner exception(s), recursively. An error ID and the full error message is listed with each exception.
How can I enable the log (trace) entries from OPC UA stack and SDK with commands like uaClient or uaServer?
!diagnostics sources setSwitchValue Verbose OpcLabs.EasyOpc.UA.UAEngineBase.SdkLog
How can I direct all tracing output from OpcCmd to a file?
In the application configuration file for OpcCmd (OpcCmd.exe.config or OpcCmd.dll.config), uncomment an entry that corresponds to a type of trace listener you want to use, under (XPath) /configuration/system.diagnostics/source/source[@name='$ImplicitListeners']/listeners . For example, uncomment <add name="DelimitedList"/> in order to obtain direct all tracing output to a CSV file named (by default) TraceOutput-DelimitedList.csv, using the DelimitedListTraceListener Class.