I wonder is it possible in Eclipse for Java (or rather in Java itself) to run a block of code only in debug mode? Just like in C++:
#ifdef DEBUG
// something to do
#else
// something else to do
#endif
I know there is no preprocessor in Java, but maybe there is some workaround?