Io ho inserito queste due istruzioni nel mio programma:

codice:
<Runtime.InteropServices.DllImport("kernel32.dll", CharSet:=Runtime.InteropServices.CharSet.Auto, ExactSpelling:=True)> _
    Public Shared Function IsDebuggerPresent() As Boolean
    End Function
    '...
    If IsDebuggerPresent() Then End
    '...
    If System.Diagnostics.Debugger.IsAttached Then End
    '...
Esistono altri metodi per rilevare la presenza di un debugger??