Thursday, October 31, 2013

Tip 7.15: You can set a breakpoint by clicking the indicator margin

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



Sara Aside

She's very big into starting off with the basics, just in case someone reading this didn't know about this tip.
You can set a breakpoint on any applicable line by clicking the indicator margin, as illustrated here.

vstip7150

Clicking here inserts the breakpoint, as shown next.

vstip7150a

Happy Programming!
Posted by Nils-Holger at 2:00 PM with 509 comments.

Wednesday, October 30, 2013

Tip 7.14: You can use tracepoints to log PrintF() or Console.WriteLine() info without editing your code

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



Right-click in the editor wherever you want to insert a tracepoint, select Breakpoint, and then select Insert Tracepoint.

vstip7140

This brings up the tracepoint dialog box, which gives you some helpful default settings. But for this example, the really helpful default is in the descriptive text for logging the contents of a variable.

vstip7140a

You'll notice that the editor shows a diamond instead of a circle.

vstip7140b

And the tracepoints are logged in the Output window's Debug pane.

vstip7140c

Happy Programming! =)
Posted by Nils-Holger at 1:28 PM with 512 comments.

Tuesday, October 29, 2013

Tip 7.13: How to have the Solution Explorer always show (or not show) the file currently opened in the editor

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



Because the default is to have the Track Active Item In Solution Explorer option enabled in the General Development Settings, a more appropriate tip is one that shows you either how to turn it back on or how to turn it off.

On the Tools–Options–Projects And Solutions–General page, there's the Track Active Item In Solution Explorer check box. When enabled, this option will sync your Solution Explorer with the open document.

VSTip7130

Happy Programming! =)
Posted by Nils-Holger at 2:07 PM with 508 comments.