+ Start a Discussion
rupesh ranjanrupesh ranjan 

Hello everyone

Ho to use Sytem.debug in this code..

global with sharing class sendsms {
    webservice static void sendsms1(String strPhone,String strName){
    AppRemind__c c =[Select Name,Email_Address__c,Phone_Mobile_Number__c, Alert__c from AppRemind__c];
    if(c.Name != null){
    if(c.Phone_Mobile_Number__c != null){
        //String txt='Your Appointment No. '+c.Name+'';
        String email=''+c.Email_Address__c+'';
        String phn=''+c.Phone_Mobile_Number__c+'';
            HttpRequest req = new HttpRequest();
            //Setting Endpoint URL to HTTP request
            //set the request type
            //HTTP object creation
            Http http = new Http();
            //Sending the Req throgh HTTPResponse object.
            HTTPResponse res = http.send(req);
Kannan N 10Kannan N 10
Have you attempted to encapsulate the code in try..catch block?
Łukasz BieniawskiŁukasz Bieniawski
Hi Rupesh,
This is not elegant but in most cases works for me. Try to paste at the end of the method i.e. 
Integer r = 9 / 0;

Exception will be thrown but you will be able to review debug log.

Hope this helps,