title: Why don't view debug rows that generates by System.debug() method in Salesforce?
body: <p>I have created a batchable class for a production system. If following code doesn't work, any code does not work. </p>
  
  <p>The code is in production system now. It takes daily exchange rates from a site everyday and creates Currency__c records. If it works when exchange rates haven't published, it takes last day exchange rates. But it does not work the way I want and I would like to test it at debug logs.</p>
  
  <p>Following method "<strong>getXML(Date today)</strong>" has never invoked when I viewed debug logs. Therefore <strong>System.debug('test: ' + result);</strong> has also never invoked.</p>
  
  <p>How can I see this log?</p>
  
  <pre><code>public String getXML(Date today){  
      counter += 1;       
      if(counter == 11) return '';
      try{
          Http h = new Http();
          HttpRequest req = new HttpRequest();       
  
          String m = today.month() + '';
          if((today.month()+'').length()==1) m = '0' + today.month();
          String d = today.day() + '';
          if((today.day()+'').length()==1) d = '0' + today.day();
          String donem = today.year() + '' + m;
          String formattedDate = d + '' + m + today.year();
  
          req.setEndpoint('http://www.tcmb.gov.tr/kurlar/' + donem + '/' + formattedDate + '.xml'); 
          req.setMethod('GET');            
          String result = '';
          if (!Test.isRunningTest()){
              HttpResponse res = h.send(req);
              result = res.getBody();
          }
          else {
              result += 'test';
          }         
          System.debug('test: ' + result);
          if(res.getStatusCode()==404){
              return getXML(today.addDays(-1));
          }   
          return result;
      }catch(Exception e){
          return getXML(today);
      }
  }
  </code></pre>