SmartZone v8.0 - Updated
Developer Guide / How To / Debug Your Application
In This Topic
    Debug Your Application
    In This Topic

    Because debugging and writing debug information to a log file is time consuming and expensive, SmartZone ICR/OCR provide the ability to control the level of information written to the debug log as well as the ability to turn off writing to a file completely.

    Control Debugging Information

    Use the methods and properties below to adjust the settings of your debugging for optimal performance.

    • Debug (ICR: Debug; OCR: Debug) - Turns on or off the ability to write to the debug log file.
    • DebugLogFile (ICR: DebugLogFile; OCR: DebugLogFile) - A filename which stores the debug log information.
    • ErrorLevel (ICR: ErrorLevel; OCR: ErrorLevel) - Controls the amount of information that is written to the debug log file.

    To set up the DebugLogFile to obtain information for one or more components, simply set up each debug log file to go to the same designated file as shown below in the code snippet:

    ICR

    …
    // set the directory and name. The log file always goes to temp by default
    string logFileName = System.Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "temp\\DebugFile.log";
    
    // Set the error level and debug log file for SmartZone ICR
    mySmartZoneICR.ErrorLevel = Accusoft.SmartZoneICR.SDK.ErrorLevelInfo.Detailed;
    mySmartZoneICR.DebugLogFile = logFileName;
    mySmartZoneICR.Debug = true;
    …
    

    OCR

    …
    // set the directory and name. The log file always goes to temp by default
    string logFileName = System.Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "temp\\DebugFile.log";
    
    // Set the error level and debug log file for SmartZone OCR
    mySmartZoneOCR.ErrorLevel = Accusoft.SmartZoneOCR.SDK.ErrorLevelInfo.Detailed;
    mySmartZoneOCR.DebugLogFile = logFileName;
    mySmartZoneOCR.Debug = true;
    …