by skizmo (1 Submission)
Category: Debugging and Error Handling
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (7 Votes)
detect if you are running in debugmode (vbstudio) or in compiledmode (.exe) at runtime !
Code Returns
true or false
Side Effects
none (offcourse :) )
Private Function bDebugMode() As Boolean
On Error GoTo ErrorHandler
'in compiledmode the next line is not
'available, so no error occurs !
Debug.Print 1 / 0
Exit Function
ErrorHandler:
bDebugMode = True
End Function