LucaMs Expert Licensed User Longtime User Jan 15, 2025 #1 In a B4J server project, I have a code module with a public Sub, like this: B4X: Copy #IF DEBUG Public Sub DoSomething End Sub #END IF In Main: B4X: Copy 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: Jan 15, 2025
In a B4J server project, I have a code module with a public Sub, like this: B4X: Copy #IF DEBUG Public Sub DoSomething End Sub #END IF In Main: B4X: Copy 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).
Sandman Expert Licensed User Longtime User Jan 15, 2025 #2 Sounds like you're calling DoSomething somewhere, and that call isn't wrapped in #IF DEBUG.
LucaMs Expert Licensed User Longtime User Jan 15, 2025 #3 Sandman said: Sounds like you're calling DoSomething somewhere, and that call isn't wrapped in #IF DEBUG. Click to expand... Yes, I should include the calls between #IF DEBUG - #END IF, but that is not my goal. Unfortunately, I cannot achieve what I want.
Sandman said: Sounds like you're calling DoSomething somewhere, and that call isn't wrapped in #IF DEBUG. Click to expand... Yes, I should include the calls between #IF DEBUG - #END IF, but that is not my goal. Unfortunately, I cannot achieve what I want.
LucaMs Expert Licensed User Longtime User Jan 15, 2025 #5 Sandman said: I'm not sure I understand what you want. Click to expand... What I should do is shoot myself! @Sagenut pointed out to me that I can do the following: B4X: Copy Public Sub DoSomething #IF DEBUG 'my code here #END IF End Sub
Sandman said: I'm not sure I understand what you want. Click to expand... What I should do is shoot myself! @Sagenut pointed out to me that I can do the following: B4X: Copy Public Sub DoSomething #IF DEBUG 'my code here #END IF End Sub