It's been a while since I last looked at the beginners guide and so I'm currently rereading it to catch up on some of the new features that have been added, that's when I came across this...
I regularly add lots of lines such as...
Then when I'm done I search for the word DEBUG and delete all those lines. This means that all the once useful debug comments are gone for good in the finished app. It would be nice to leave them in but have the final released code ignore lines commented as DEBUG, this is my wish
I've seen code where the programmer sets debug code within conditional statements and then uses a flag to enable the debug statements as required, which is another way of doing it without needing to actually delete any debug lines of code. I suppose its all down to personal preference.
Kind regards,
RandomCoder
That's when I thought wouldn't it be nice to have a similar option of debug code.Ignoring warnings
You, as the developer, can choose to ignore any warning. Adding an "ignore" comment will remove
all the warnings for that specific line:
B4X:Sub UnusedSub(a As Int) 'ignore
I regularly add lots of lines such as...
B4X:
Log("Some useful information") 'DEBUG
I've seen code where the programmer sets debug code within conditional statements and then uses a flag to enable the debug statements as required, which is another way of doing it without needing to actually delete any debug lines of code. I suppose its all down to personal preference.
Kind regards,
RandomCoder