August 17, 2012

Example for System.debug() in Salesforce

The main use of System.debug() is to track the flow of program and find errors.


  parsedCSVdata = parseCSV(fileString,false);
System.debug('Parsed CSV Data -->' + parsedCSVdata);

To see this go to Setup --> Administration Setup --> Monitoring --> Debug Log
Assign the user and execute the Apex code. Then refresh the debug log page and click view button.

Debug log:


1 comment:

  1. There is great tool for show nicer data which you parse. for example if you have 200 lines of records, it's hard to check them. Use which parse your salesforce log into nice output