User Tools

Site Tools

Navigation:  Language Reference > 13 - Built-in Functions >====== DEBUGHOOK (hook data into debugger list) ====== Previous pageReturn to chapter overviewNext page

DEBUGHOOK( element )


DEBUGHOOK Include a data element into the debugger stack trace list.
element Any valid addressable data element declared in your program that is visible from the scope where the DEBUGHOOK statement is used. Prefix notation or Field Qualification Syntax is permitted.

From a language standpoint, the optimizing compiler of Clarion produces the necessary debug information to allow the debugger to find a data object and show its value.

Instances of threaded variables are allocated at run time, so the debugger cannot show these variables directly. If a function is using threaded variables, the compiler generates calls to a runtime library function, which returns an address of the valid instance and the instruction to store the obtained address in the local variable. This code allows the use of correct instances of threaded variables in the function and also allows you see their values in the debugger. This is only possible for those variables actually used in the function. Because any program can have thousands of these threaded variables, it is impossible to hook every variable declared in the program by every procedure.

The goal of the DEBUGHOOK statement is to use the requested variable in the procedure and hence force the compiler to obtain its instance, which can then be shown by the debugger.

To guarantee that data is hooked within the target procedure rather than in one of methods of local classes, the DEBUGHOOK statement should be included just after the CODE statement of the target procedure. Any calls into the ABC Library should be made before the %BeforeWindowManagerRun embed point, as it is the only available embed point in the CODE section of ABC based windowed procedures.



? DEBUGHOOK (File1.Record)   !FIL:Record is also valid

? DEBUGHOOK (File2.Record)

? DEBUGHOOK (File2.Memo)

debughook_hook_data_to_debugger_list_.htm.txt · Last modified: 2021/04/15 15:57 by