Online Eiffel Documentation |
Documentation Home > Tools > EiffelStudio > EiffelStudio How To's > Running and debugging |
EiffelStudio |
Using debug clauses |
Eiffel provides ways to add debug code to features to help during their debugging. You may think of it as the well-known C construct:
#ifdef MY_DEBUG_FLAG/* Debug code is here */ #endif
The corresponding construct in Eiffel is provided by the debug keyword. It is possible to wrap code inside a debug clause like this:
debug("MY_DEBUG_FLAG") -- Debug code is here. end
It is then possible to enable or disable debug clauses globally.
To modify the debug clauses status:
Tip: Debug clauses make it easy to remove all debug messages when finalizing a system.
Copyright 1993-2006 Eiffel Software. All rights reserved. |