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

Is it possible to have checkpoints to debug APEX ??

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

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 -
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..  
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