Ticket #7 (closed enhancement: fixed)
Add new example on using compilation hooks and term expansion for debugging
| Reported by: | pmoura | Owned by: | pmoura |
|---|---|---|---|
| Priority: | minor | Milestone: | Logtalk distribution |
| Component: | examples | Version: | 2.31.4 |
| Keywords: | debugging | Cc: |
Description
Add new example on using compilation hooks and term expansion for debugging (see discussion on ticket #6). The idea is to support conditional debugging statements that are either activated or removed (using term expansion) depending on a compiler hook/1 option. Typically there would be two hook objects and corresponding hook/1 options leading to two loader files. One loader file is used in production runs and removes the debugging statements by expanding them to true. The other loader file expands the debugging statements to the corresponding goals. This debugging solution can be used without compiling entities in debug mode.
