An overview of debuging

I have a chipworkx chip on a custom built pc board. If I understand it correctly, I use debug.print to send text to the output window when debug is selected in view box of output window. I think that these commands do not compile when you build and deploy. If you deploy using debug then these commands compile. Is this all correct or am I missing anything?

the debug assembly always compiles, even when using the release mode… unlike the desktop version of .net…

you can use the code below to know if you are in debugging mode or not…


if (System.Diagnostics.Debugger.IsAttached)
            {
              Debug.Print("debugger is present");
            }else
            {
                //the LED on your board will light up when running without the debugger
                for (int i = 0; i < 100; i++)
                {
                    PulseDebugLED();
                    Thread.Sleep(50);
                }
                Debug.Print("No debugger is present");//you won't see this because of no debugger.. can print to the LCD instead.
            }