Debugging Windows and Windows Mobile Device Development

Device client and Unwired Server troubleshooting tools for diagnosing Microsoft Windows and Windows Mobile development problems.

Client-Side Debugging

Problems on the device client side that may cause client application problems:
  • Unwired Server connection failed.
  • Data does not appear on the client device.
  • Physical device problems, such as low battery or low memory.
To find out more information on the device client side:
  • If you have implemented debugging in your generated or custom code (which Sybase recommends), turn on debugging and review the debugging information. See Developer Guide: Windows and Windows Mobile Object API Applications about using the MBOLogger class to add log levels to messages reported to the console.
  • Check the log record on the device. Use the DatabaseClass.GetLogRecord(Sybase.Persistence.Query) or Entity.GetLogRecords methods.

    This is the log format

    level,code,eisCode,message,component,entityKey,operation,requestId,timestamp

    This log format generates output similar to:

    level code eisCode message component entityKey operation requestId timestamp
     5,500,'','java.lang.SecurityException:Authorization failed: Domain = default Package = end2end.rdb:1.0 mboName = simpleCustomer action = delete','simpleCustomer','100001','delete','100014','2010-05-11 14:45:59.710'
                
    • level – the log level currently set. Values include: 1 = TRACE, 2 = DEBUG, 3 = INFO, 4 = WARN, 5 = ERROR, 6 = FATAL, 7 = OFF.
    • code – Unwired Server administration codes, based on HTTP return codes.
      • Replication synchronization codes:
        • 200 – success.
        • 401 – the client request included invalid credentials, or authentication failed for some other reason.
        • 404 – the client tried to access a nonexistent package or MBO.
        • 409 – backend EIS is deadlocked.
        • 412 – backend EIS threw a constraint exception.
        • 500 – failure.
        • 503 – backend EIS is not responding, or the connection is terminated.
        • 601 – the cache database (CDB) reported an error.
    • eisCode – a value specific to the EIS backend, if any. Typically defaults to blank or 0 (zero); can be set via result checker.
    • message – the message content.
    • component – MBO name.
    • entityKey – MBO surrogate key, used to identify and track MBO instances and data.
    • operation – operation name.
    • requestId – operation replay request ID or messaging-based synchronization message request ID.
    • timestamp – message logged time, or operation execution time.
  • For other issues, you can turn on SQLTrace trace on the device side to trace Client Object API activity.
    // To enable SQL trace with values also displayed
    SUP101DB.GetConnectionProfile().EnableTrace(true, true);

Server-Side Debugging

Problems on the Unwired Server side that may cause device client problems:
  • The domain or package does not exist. If you create a new domain, whose default status is disabled, it is unavailable until enabled.
  • Authentication failed for the synchronizing user.
  • The operation role check failed for the synchronizing user.
  • Back-end authentication failed.
  • An operation failed on the remote, replication database back end, for example, a table or foreign key does not exist.
  • An operation failed on the Web Service, REST, or SAP® back end.
To find out more information on the Unwired Server side:
  • Check the Unwired Server log files.
  • You can also obtain DEBUG information for a specific device:
    • View information through the SCC administration console:
      1. Set the DEBUG level to a higher value for a specified device through SCC administration console:
        1. On SCC, select Application Connections, then select Properties... > Device Advanced.
        2. Set the Debug Trace Level value.
      2. Set the TRACE file size to be more than 50KB.
      3. View the trace file through SCC.
    • Check the <server_install_folder>\UnwiredPlatform\Servers \MessagingServer\Bin\ClientTrace directory to see the mobile device client log files for information about a specific device.
    Note: It is important to return to INFO mode as soon as possible, since DEBUG mode can affect system performance.
Related reference
Sybase Unwired Platform End-to-End Process Flow
Debugging Message Synchronization
Debugging Replication Synchronization
Debugging the Cache
Debugging Data Change Notification
Debugging Android Device Development
Debugging BlackBerry Device Development
Debugging iOS Device Development
Debugging DOE-C End-to-End Process Flow
Debugging JCO End-to-End Process Flow