Why not just test the compilation constant directly? You are not gaining anything by testing an actual variable.
Public Class Form1
Private Sub Form1_Load(....)
#if DEBUG then
<do something>
#else
<do something else>
#end if
End Sub
End Class