Detect if app is in debug mode?

jo1234

Active Member
Licensed User
Longtime User
Hi,

is there a way to detect if the app is in debug mode (e.g. usb debug is active)?

I searched the forum but coundn't find anything.

thanks a lot,
Johannes
 
You can use this code (requires the Reflection library):
Code: Copy
Sub Process_Globals
    Dim debugMode As Boolean
End Sub
Sub Globals

End Sub

Sub Activity_Create(FirstTime As Boolean)
    If FirstTime Then
        Dim r As Reflector
        debugMode = r.GetStaticField("anywheresoftware.b4a.BA", "debugMode")
    End If
    Log(debugMode)
End Sub
 
Upvote 0
Back
Top