I can simply insert code snippet for the Console.WriteLine();
by just using the cw
with Tab + Tab. But I'm not able to find the same option for the Debug.WriteLine();
.
I want to know how can we customize the code snippet template in Visual Studio for Windows Phone?
On the menu bar, choose Edit > IntelliSense > Insert Snippet. From the right-click or context menu in the code editor, choose Snippet > Insert Snippet.
WriteLine calls may not display in the output window if you have the Visual Studio option "Redirect all Output Window text to the Immediate Window" checked under the menu Tools → Options → Debugging → General. To display "Tools → Options → Debugging", check the box next to "Tools → Options → Show All Settings".
By default, the output is written to an instance of DefaultTraceListener. This method calls the WriteLine method of the trace listener.
In Visual Studio 2010 (and assuming other versions as well), there is not a snippet for Debug.WriteLine()
. In that case, you'll need to create a custom snippet. Fortunately, it isn't that hard with the available resources:
If you're using ReSharper, then Code Templates and specifically Live Templates are a quick and easy option.
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