자료출처  http://yegam400.tistory.com/395

 

C#에서 OutputDebugString을 할려면 다음과 같은 2가지 방법이 있다.

Debug.Write(), Trace.Write()의 차이점은 Debug는 Debug모드 빌드에서만 동작하며, Trace는 Release/Debug 둘다 동작한다는 점이다. 물론 OutputDebugString기반이므로 DebugView에서도 확인할 수 있다.

 

System.Diagnostics.Debug.Write("Debug1");

System.Diagnostics.Debug.Write("Debug2");

System.Diagnostics.Trace.Write("Trace1");

System.Diagnostics.Trace.Write("Trace2"); 

 

자료출처  http://www.go4expert.com/forums/showthread.php?t=2061

 

System.Diagnostics.Debug.WriteLine("I am using dot net debugging");
System.Diagnostics.Trace.WriteLine("I am using dot net tracing");


Posted by 모과이IT
,