Salesforce

How Do I Debug Rich Client Tasks? (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

How Do I Debug Rich Client Tasks? (Magic xpa 4.x)

In Rich Client tasks, the server side can be debugged using the Activity Monitor. The client-side entries are added to the Activity Monitor when the next event is processed.

To debug the client side:

  1. Set the Client Activity filter on the server to Yes. Otherwise, you will only see the server activity.

  2. In the [MAGIC_RIA] section of the Magic.ini file:

  • In the InternalLogFile setting, set the file to hold the logs of the client-side activities.

  • In the InternalLogSync setting, you can control the timing of opening and closing the log.

  • In the InternalLogLevel setting, you can activate debug logs on your RIA clients by defining a valid value.

If the Rich Client task crashes or hangs while performing operations on the client side, then they will not appear in the Activity Monitor. Therefore, Magic xpa provides a solution to let you debug the client-side sequence.

To debug client-side crashes:

  1. Set the LogClientSequenceForActivityMonitor setting in the HTML file to Yes. The HTML file is created when you use the Rich Client Deployment Builder. If the setting is set to Yes, client activities will be written to a local log file on the client. This log file will include all the information that was not yet sent to the Server. The log file will be deleted after each event execution or when the application is terminated.

  2. Launch the application. Magic xpa will scan for existing log files. If there are any from the last crash, they will be sent to the Server (and appear in the Activity Monitor).

  3. When a crash occurs, exit all other parallel processes (so that their log files will be deleted normally).

  4. Restart the application and the log file with the last client sequence will be sent to the Server (and appear in the Activity Monitor).

  5. The Activity Monitor will be updated with the Client log, and now you can see the location of the problem.

Note: The Activity Monitor's lines are pink for the server and white for the client.

A breakpoint on a server-side action (or a neutral-side action that is performed on the server side) will cause the engine to halt and wait for the developer. A breakpoint on a client-side action (or a neutral-side action that is performed on the client side) will be ignored. Break Now will break during the next server access.

When performing Step to a Client operation, the Debugger will halt again after going back to the server, so if there are several client actions, they will be performed without interference from the Debugger.

Reference
Attachment 
Attachment