TheSwamp
Code Red => .NET => Topic started by: Glenn R on August 01, 2008, 12:10:53 PM
-
May make your debugging (http://blogs.msdn.com/pedram/archive/2008/07/20/net-debugging-made-easier.aspx) life easier.
-
Thanks
-
Yes, thanks Glenn. Nice little find.
-
great link Glenn
-
Taken from the news channel when you start Visual Studio 2008 BTW...first link yesterday. It's very interesting what you can find on it actually.
-
Great find Glenn,
Another useful attribute is ;
[System.Diagnostics.Conditional()]
example;
[System.Diagnostics.Conditional("DEBUG")]
internal static void DEBUG_PRINT_VAL(object o)
{
DEBUG_PRINT_VAL(string.Empty, o);
}
[System.Diagnostics.Conditional("DEBUG")]
internal static void DEBUG_PRINT_VAL(string varname , object o)
{
AcAp.Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage(varname + o.ToString());
}
[CommandMethod("test")]
public static void test()
{
Point3d A = Point3d.Origin;
//if DEBUG is not defined, the compiler will remove this call
DEBUG_PRINT_VAL(A);
}