Herfried
Tue Feb 28 16:08:10 CST 2006
"Jared" <jared@paradigmitz.net.au> schrieb:
> I would like to write a line of code which will get used in several
> debugging points, to look like this..
>
> If app.Mode = IDE then Stop Else End
Maybe the following solutions fit your requirements:
\\\
#If DEBUG Then
Console.WriteLine("Debug mode.")
#Else
Console.WriteLine("Release mode.")
#End If
///
Make sure that the option "Configuration settings" -> "Build" "Define DEBUG
constant" in the project properties is checked.
- and/or -
You can check if a debugger is attached:
'System.Diagnostics.Debugger.IsAttached'.
--
M S Herfried K. Wagner
M V P <URL:
http://dotnet.mvps.org/>
V B <URL:
http://classicvb.org/petition/>