Debug output

For virtually any object displayed in the Object tool, it is possible for the developer to cause the Object tool to display a user-definable string value next to the object address.

In order to have the instances of a class display such a string in the object tool, make the class an heir to class DEBUG_OUTPUT. Then implement the feature debug_output to return the string to be displayed. At run-time, the debugger will automatically query this feature on all objects that define it, and then will display the results in the object tool and the evaluation tool.

Sample: The numeric *_REF classes inherit (through class NUMERIC) from the class DEBUG_OUTPUT so that it is possible to see immediately the value of *_REF objects in the Object tool. The *_REF classes are reference versions of the basic Eiffel classes such as INTEGER and DOUBLE. So, without DEBUG_OUTPUT, if you wanted to see, for example, the value of the INTEGER associated with an instance of INTEGER_REF displayed in the Object tool, you would have expand the reference first.

Tip: If an object has a long string output or an output with carriage returns, for instance, pick-and-drop it to the expanded display command in the object tool.

cached: 11/21/2024 8:57:07.000 AM