Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Debugging Output

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?

like image 215
Robert Avatar asked Oct 21 '08 19:10

Robert


People also ask

How do I disable debugging in Visual Studio?

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.


1 Answers

All calls to System.Diagnostics.Debug.Print() will be removed when you switch to a release version.

like image 185
Mark Cidade Avatar answered Sep 28 '22 21:09

Mark Cidade