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
simiyon A 7simiyon A 7 

Need to debug the Apex classes

Hi All,

I am a beginner in Salesforce apex development. can you please tell me how to debug the each and every line in the Apex classes?
sandeep sankhlasandeep sankhla
Hi Simiyon,

You can go to setup and then type debug log in search..then click on debug log..

Then select the logged in user and then when you load our class you will be able to see each and every line of debug there...

You can put system.debug('----------'); in your code and then check them there to see the output..

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.

Thanks,
Sandeep
Salesforce Certified Developer 
simiyon A 7simiyon A 7
Hi Sandeep,

Thanks for your quick reply. I already used this option but i want to debug the code like visual studio. is there any options available to debug line by line
Yuvraj G 1Yuvraj G 1
Hi Simiyon,

You can log that by using System.debug. 
In Visual Studio, It cannot be compiled while writing or saving the code. You have to debug it manually for checking the error occured or not.
In Apex, Error checking is on the go. You can't save the apex class page untill you clear the error. So while saving the file, it will check code line by line.