Prepare the Files

Parent Previous Next

Prepare the Files.

Only a few things must be done in order to debug your code:


Please note that having the compiler insert extra trace instructions into the bytecode can increase the size of the bytecode significantly and slow down execution.


Trace File.

As described here the trace file is generated using the library function @TraceWriteFile. The trace file is a text file and can contain references to the source code and/or traced values. The trace file is considered confidential and should not be made available to outsiders.


Each event is written line-by-line. In case an event refers to some source code and a traced value, the source code reference is written first.


The traced values are written as strings based on their recorded length. Please note the maximum length of traced values depends on the trace module properties which may have been changed during runtime.


The source code references are written in a short indirect form, but these references are understandable to the debugger and can be matched to the actual source code, provided the compiler generated the bytecode and the CUF at the same time.


Compilation Unit File (CUF).

When the CUF is created by the compiler it includes lots of information about the project and source files involved. The most significant elements are:


Note 1: Please be aware that a CUF must be kept just as secret and safe as the rest of your project.


When a trace event refers to the source code, it uses the time-stamp linked to the source as an indirect reference. It identifies the source as it was at the exact moment of compilation, and not as it is now.


Later is described how to load the CUF and the trace file into the debugger, and how the debugger can present the actual source code for each event, completely hiding the indirect time-stamp references.


For now please be aware: If you by accident should load a CUF and a trace file which do not refer to the same time-stamps, then the trace events have no source code available and it is not possible to perform the debugging. In case of problems of this nature you can always check the time-stamps manually, opening the files using an ordinary text editor.