I want to write some variables in my ASP MVC3 application during debugging. I tried various things such as:
Debug.Log(topTitle + " " + subTitle);
This does not work. How can I write to the VS2010 console from my C # code?
To write to the console window in Visual Studio, use:
System.Diagnostics.Debug.WriteLine(topTitle + " " + subTitle);
Below is a screenshot:
You can use the Debug class to extract debugging information from your application. You can even add a tracer to your web.config file to redirect the output to a file or event log when you are not debugging Visual Studio.
web.config
or you can view and manage using the Immediate window . Direct window
Immediate window
System.Diagnostics.Debug does not have a logging method. You can use System.Diagnostics.Debug.WriteLine . You can view the output in the output window. Then make sure you are in debug mode.
System.Diagnostics.Debug
System.Diagnostics.Debug.WriteLine
. Debug information is displayed only when you are working in debug mode. In release mode, debug statements will not be visible (you can use Trace instead of Debug if you want these statements to be visible in Release mode).
Please refer to the following article
How to track and debug in Visual C #
Source: https://habr.com/ru/post/927991/More articles:UTF-8 and UTF-16 in Java - javaIs it possible to change the non-expendable iOS application after it appears? - iosWhat is the interface for ARM system calls and where is it defined in the Linux kernel? - linuxUpdate content to purchase apps for an iOS app? - iosHow to get the free version (without trial) of the "Cuda Fortran" compiler? - fortranJSP and scriptlets - javaDifference in using downcast and upcast pointer? - c ++How to create a limited collection using mongoose? - collectionsIronPython specific method of using NumPy and SciPy - pythonDT_NTEXT columns in SSIS package and truncation warnings - sqlAll Articles