I'd like to sprinkle some print statements in my code to show where I am and print important values to a console window.
How do I do that, but then be able to turn it off for the release version?
Enable or disable Just-In-Time debugging in Visual Studio You can configure Just-In-Time debugging from the Visual Studio Tools > Options (or Debug > Options) dialog box. To enable or disable Just-In-Time debugging: On the Tools or Debug menu, select Options > Debugging > Just-In-Time.
All calls to System.Diagnostics.Debug.Print()
will be removed when you switch to a release version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With