C Chris2 Well-Known Member Licensed User Longtime User Aug 6, 2026 #1 Forgive me if this can already be done somehow but... When testing server/client apps in B4J I run both apps through the IDE at the same time on the same machine. We are limited to running only one app in DEBUG at a time but I want to see the Log() entries that I have in the IDEs of both apps. I don't really want those Log() entries to be in the code of the final compiled release though. If there was a compilation condition that could be used like: B4X: Copy #If Not(obfuscated) Log($"Shown in Debug & Release but not Release(obfustaced)"$) #End if then I would see Log() entries when testing within the IDE in both DEBUG & RELEASE mode, but the Log() would not be present in the final release for which I always compile under Release(obfuscated). I hope that makes sense! [I guess this an alternative to the wish of being able to run multiple apps in Debug at the same time on the same machine] EDIT: I just found that @tchart has already wished for this - https://www.b4x.com/android/forum/threads/compiler-directive-release_obfuscated.139352/ My apologies for the duplication. I don't think that it's been impemented yet though. Last edited: Aug 7, 2026
Forgive me if this can already be done somehow but... When testing server/client apps in B4J I run both apps through the IDE at the same time on the same machine. We are limited to running only one app in DEBUG at a time but I want to see the Log() entries that I have in the IDEs of both apps. I don't really want those Log() entries to be in the code of the final compiled release though. If there was a compilation condition that could be used like: B4X: Copy #If Not(obfuscated) Log($"Shown in Debug & Release but not Release(obfustaced)"$) #End if then I would see Log() entries when testing within the IDE in both DEBUG & RELEASE mode, but the Log() would not be present in the final release for which I always compile under Release(obfuscated). I hope that makes sense! [I guess this an alternative to the wish of being able to run multiple apps in Debug at the same time on the same machine] EDIT: I just found that @tchart has already wished for this - https://www.b4x.com/android/forum/threads/compiler-directive-release_obfuscated.139352/ My apologies for the duplication. I don't think that it's been impemented yet though.
Erel B4X founder Staff member Licensed User Longtime User Aug 9, 2026 #2 There is already a built-in OBFUSCATED symbol: Your code should work.
C Chris2 Well-Known Member Licensed User Longtime User Aug 10, 2026 #3 Hmm, I'm not sure how I missed that. Although it works as expected for the enclosed code, the greying out of text in the IDE doesn't appear to work as normal: With #If OBFUSCATED, the code is always greyed out no matter which compile mode is selected. And the converse is true with #If Not(OBFUSCATED) I wouldn't expect the Log() to be greyed out here when Release(obfuscated) us selected: And with #If Not(OBFUSCATED), I'd expect the code to be grey only under Release(obfuscated): Attachments 1786347482504.png 4.9 KB · Views: 114
Hmm, I'm not sure how I missed that. Although it works as expected for the enclosed code, the greying out of text in the IDE doesn't appear to work as normal: With #If OBFUSCATED, the code is always greyed out no matter which compile mode is selected. And the converse is true with #If Not(OBFUSCATED) I wouldn't expect the Log() to be greyed out here when Release(obfuscated) us selected: And with #If Not(OBFUSCATED), I'd expect the code to be grey only under Release(obfuscated):
Erel B4X founder Staff member Licensed User Longtime User Aug 10, 2026 #4 You are correct (https://www.b4x.com/android/forum/threads/b4j-v10-0-is-available-for-download.155241/#content), this symbol is only set during compilation.
You are correct (https://www.b4x.com/android/forum/threads/b4j-v10-0-is-available-for-download.155241/#content), this symbol is only set during compilation.
C Chris2 Well-Known Member Licensed User Longtime User Aug 10, 2026 #5 So I didn't spot that the thing I was wishing for already exists, and then I didn't read the info from when it was added - let's call it an off day
So I didn't spot that the thing I was wishing for already exists, and then I didn't read the info from when it was added - let's call it an off day