You need to sign in to do that
Don't have an account?
ravi teja 81
how to debug apex classes,visualforce pages,triggers
hi iam new to salesforce i have written some sample classes how can i debug those classes,pages and triggers. any documentation or videos is there please share
there are 2 ways.
1. Go to setup and click Monitoring and you can check your debug logs.
2. Go to developer console ,In below pane you can see ' Logs ' tab ,click on it to see log details.
Let us know if it helps.
Ashish is correct you can see debug log in two different way .
Please check below link to get more detail about debug log
.https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_debugging_debug_log.htm (https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_debugging_system_log_console.htm)
https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_debugging_system_log_console.htm
Please let us know still if you are facing any issue.
## Once execute the Apex class or trigger, automatically generate logs....you can able to see the logs.Please see the below two ways.
Ex:How to put debug logs in apex class:
Public class MyHelloWorld {
// initialization datatypes
// declaration of methods
MyHelloWorld(){
System.debug('Welcome to Apex world');
}
}
Ex:How to put debug logs in triggers:
trigger MyHelloWorld on <SObject>(Events){
// Here write business logic.
System.debug('Welcome to Apex trigger world');
}
Please follow the below steps,if you want see the debug log output.
Way 1
Navigation:
Go to your name and click on developer console in dropdown.Please see the below screenshot
Go to developer console ,In below pane you can see ' Logs ' tab ,click on it to see log details.
Way 2
Navigation:
Click on SetUp(Please See the above screenshot) and go to left said panel enter Debuglog in inputbox/search box,Please see the below screenshot.