Keeping an image and its runtime code in sync
When you package your project from a passive image and then run the packaged code on the target platform without making changes to the code in the passive image, the image and its runtime code are said to be in sync. There are cases, however, where you might change the code in the passive image, thus creating a situation where code on the target platform and on the passive image from which you packaged that code are not in sync.
In some cases, you will use the passive image from which you packaged a project as the debugging image for that project. For example, if you create a passive image named My Target and package a project from it, chances are you will debug any errors that occur with that project in the passive image named My Target. There will be times, however, when you will debug a project from the development image. One reason for doing so being that the passive image from which you created the packaged code no longer exists.
As with the Smalltalk debugger available in the development image, the stack dump debugger and the interactive debugger particular to the passive image guarantee that the source displayed for a particular method is the correct source; otherwise, you are asked whether debugging can continue using the "best guess" of what source to display. VA Smalltalk Server provides mechanisms to enable debugging when the image and its runtime code are out of sync. When an project is packaged, information about the state of the image is recorded in a file. The information in this file is called a snapshot, and it allows cross development debuggers to retrieve the correct method source from the library, for every method contained in the image.
The source retrieval works provided the snapshot can be found. Should the snapshot have been lost or the library manager differ from the one used during packaging, the debuggers will work, but no method source will be displayed.
If the passive image and its associated code running on the target platform are in sync, the source display performance is improved. When the image and its runtime code are in sync, the debugger uses the passive image for method source searching rather than relying solely on the information provided by the code running on the target platform. Keeping an image and its runtime code in sync has other benefits, such as providing a context for the manager queries you can make from a debugger.
Last modified date: 05/09/2019