Skip to content

Debugging

Conditional Compilation

For conditional compilation first we need to define local or global conditional variable

project level Variable

image

Module Level

' Declare public compilation constant in Declarations section. 
#Const conDebug = 1 

Use Case

Sub SelectiveExecution() 
 #If conDebug = 1 Then 
 . ' Run code with debugging statements. 
 . 
 . 
 #Else 
 . ' Run normal code. 
 . 
 . 
 #End If 
End Sub