function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kevin.glinski1.3916118500634734E12kevin.glinski1.3916118500634734E12 

Debugging apex that doesn't run in a visualforce page

I'm working with the LiveAgent custom routing pilot and you have to implement a LiveAgent.LiveChatRouter.  This class runs in the background when a new chat is ready to be routed.  Since i'm in the vast minority working with this API, i suppose it is most like when you create a rest endpoint in apex.  I'm not seeing any traces for this class in the developer console, and believe it isn't running at all.  I do see see traces when my rest endpoint classes run, so i'm thinking it is an issue with this API.  

Does anyone else have suggestions on how to debug this class?  I should expect to see it in the console, right?
Ashish_SFDCAshish_SFDC
HI Kevin, 


Enable Debug logs for the User who is testing and you will get lot more information in the logs which definately will leave some clue. 

To view the details of a debug log, from Setup, click Monitoring | Debug Logs or Logs | Debug Logs, and then click View next to the debug log you want to examine. Click Download to download the log as an XML file.
The debug log contains information about the transaction, such as if it was successful, the size of the log (in bytes), how long the transaction took in milliseconds, and so on. The log itself contains additional information about the transaction, depending on the filters set for the user.

https://help.salesforce.com/HTViewHelpDoc?id=code_viewing_log_details.htm&language=en_US


Regards,
Ashish
SrikanthKuruvaSrikanthKuruva
The custom routing class runs in a "Automated Process"  user context and we cannot enable the debug logs for this user. the only way to track is to create a record in a custom object and track the progress/errors that occur in the custom routing class in hte custom object.