c# - Windows Phone - Debug info lines cause the program to malfunction -
Hi I am developing a Windows Phone app and I
System.Diagnostics I use Debug.process ()
Function to write some debug info and when I run the program in debug mode, while my phone is connected to my computer and a visual studio, there is no problem. But when I run programs without a debugger - when installed in each release and debug mode - these lines of debug info cause the app to face exceptions!
Can anyone say that what is happening there?
You can try to check whether the debugger is enclosed, then implement specific code for debugging purpose only if the < Code> IsAttached value is correct:
if (System.Diagnostics.Debugger.IsAttached) {System.Diagnostics.Debug.WriteLine (); }
Comments
Post a Comment