Bug? #IF DEBUG

LucaMs

Expert
Licensed User
Longtime User
In a B4J server project, I have a code module with a public Sub, like this:
B4X:
#IF DEBUG

Public Sub DoSomething
End Sub

#END IF
In Main:
B4X:
modUtils.DoSomething
In the IDE, DEBUG is selected but this message appears:

Unknown member: DoSomething

However, the project compiles and works.


EDIT: but in release mode, calls to DoSomething are a problem, it is not possible to compile in Release mode (and this is normal, correct, in Release mode that Sub does not exist).
 
Last edited:

Sandman

Expert
Licensed User
Longtime User
Sounds like you're calling DoSomething somewhere, and that call isn't wrapped in #IF DEBUG.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…