Checkpoints

Checkpoints allow you to freeze variables at a specific point of execution in your program and examine them later. The point in the code at which the checkpoint is captured is called a checkpoint location. It is similar to a breakpoint in a standard development environment.

To work with checkpoints, open Developer Console and click the Checkpoints tab. To set a checkpoint location, locate the code using the Tests or Repository tab and click to the left of the desired line. In Figure 4.6, a checkpoint location has been set at line 10, indicated by the dot to the left of the line number.

Image

Figure 4.6 Setting a heap dump location

When code is executed at a checkpoint location, a checkpoint is generated. It can be viewed by double-clicking on a row in the Checkpoints tab, as shown in Figure 4.7. A checkpoint has been selected in the Checkpoints tab at the bottom, and its details shown in the top panel. The Symbols tab lists the program’s variables and their values at the point in time of the checkpoint.

Image

Figure 4.7 Examining a heap dump

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.231.205