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
Shreya JainShreya Jain 

how can i see debug of Rest controller i.e. Web Service in Salesforce?

Adilson Arcoverde JrAdilson Arcoverde Jr
Hi Shreya,

The easiest way is to log as your integration user, open developer console and choose logs tab.

You'll be able to debug.

Hope you find this solution useful. If it does, please mark as Best Answer.

Regards.
Raj VakatiRaj Vakati

You no need to log in as a specific user for integration logs for most of the cases and its depends on the how you org is setuped ..

Set a user-based trace flag o

From Setup, enter Debug Logs in the Quick Find box, then click Debug Logs.
Click New.
Set the traced entity type to User.
Open the lookup for the Traced Entity Name field, and then find and select your guest user.
Assign a debug level to your trace flag.
Click Save.



https://help.salesforce.com/articleView?id=code_add_users_debug_log.htm&type=5
 
Adilson Arcoverde JrAdilson Arcoverde Jr
Hi Raj 

Your answer is correc, but I had serious problems with debug generation limits. Whenever it is possible, as choose to log as integration user to mitigate this risk. 

Once the debug log limits has been reached, everybody using the org will have to wait 24h to be able to debug again.

Regards.