Wish #define

Robert Valentino

Well-Known Member
Licensed User
Longtime User
Be nice if B4A had a #define

On device I cannot use the IDE to debug I use a function
B4X:
cLogMsgs.LogMsg("Some Message")
to log a message to a log file but can't click on the line in the IDE because it takes me to LogMsg function instead of the calling routine location

When I can debug on the IDE I would prefer the same code to be
B4X:
Log("Some Message")
this would allow me to click on the line in the IDE

Something like a #Define would be nice
B4X:
#if  IDE_Debugging
#define LogOut Log
#else
#define LogOut cLogMsgs.LogMsg
#end if

Then I could have in my code
B4X:
LogOut("Some Message")

And the compiler would replace at compile time.

Just seems like we have evolved to this point and it would be nice

BobVal
 
Top