+ Start a Discussion
DineshGuptaDineshGupta 

Is it possible to have checkpoints to debug APEX ??

Can we depug apex using check points ?? somethink like we do in .Net in VisualStudio ??

KaranrajKaranraj
No, You can't have checkpoint functioanality similar to .Net in visualstudio. We have checkpoint in developer console to debug, but it won't stop the execution 

Using checkpoint, we can gather values in variables at that particular line execution. Below are some important information about checkpoint :
  • Similar to breakpoint but it does not halt execution at that point
  • Checkpoint can be viewed in in two tabs of perspective
    • Checkpoint inspector
    • Checkpoints tab
  • Checkpoint statistics gathered right before the line of code with checkpoint executed
    • Statistics are gathered only once, regardless of how many times code is executed
  • We can run SOQL or apex code at that checkpoint

For the advanced debuging techniques check this blog post - http://www.jitendrazaa.com/blog/salesforce/advance-apex-debugging-in-salesforce-and-best-practices-videos/
DineshGuptaDineshGupta
Thanks @karanraj, for your response.
But why salesforce has not impemented the checkpoint functionality. This would help the developers in reducing their debugging time and makes their life better.
Is it something salesforce has missed or intentionally left with any particular reason like cloud servers cannot handle the load..  
KaranrajKaranraj
Yes due to Multi-tetant architeture model, currently its not possible. You do not have hooks into the actual runtime so you cannot do this and there is no tools provided by salesforce to allow this since they don't want people to freeze processes on the servers to do debugging to handle the load.  May be in future salesforce might come up with the solution for this