Pages

Thursday, November 20, 2014

How to see all break points in visual studio 2012 and 2013



Method 1
--------------
Navigate to Debug->Windows->Breakpoints



Method 2
-----------
You can find the breakpoints window beside output window on the bottom left side as shown in below.





Monday, November 10, 2014

How to write debug info onto console in MVC in visual studio



I wanted to debug a piece of code which was not working in my MVC site .To write debug statements onto output window,Simply add the following code

System.Diagnostics.Debug.WriteLine("Test statement");
 
Later start the  website using Debug mode - and check for the statements in the Output tab in Visual Studio
This is what I do for a lot of MVC 3,4,5 applications and it works perfectly.

deepstutorials:how to Track Active Item in Solution Explorer in visual Studio



I found it very annoying to search the file in the solution explorer of the Visual Studio.Came to know that there is a shortcut to highlight the file in the Solution explorer.This tip works from VS 2010 and above.

Navigate to Tools->options->Select Project and Solutions and check the option on or off as per your requirement(If its checked, we are able to see the active item in visual studio)



Open a file and the file is highlighted in the solution explorer as shown below in the following snapshot.

File Highlighted in the solution explorer


Monday, November 3, 2014

#deepstutorials:The type or namespace name 'Required' could not be found



A rookie problem i encountered and wanted to document . Hopefully this saves someone out there some time.  I wasn’t able to resolve it automatically in Visual Studio 2013.

If you hit the errors:

The type or namespace name 'RequiredAttribute' could not be found”

“The type or namespace name 'Required' could not be found”


Make sure you add

using System.ComponentModel.DataAnnotations;

You can refer to this documentation link 


Sunday, November 2, 2014

#deepstutorials:change potrait layout to landscape layout in MS Word




 The following document is in potrait mode which is the default mode in MS Word



To change the document from potrait layout to landscape layout  Select Page layout ->orientation and choose potrait or landscape orientation accordingly as shown in the below screenshot