Tips on Debugging : Using DebuggerStepThrough attribute September 22, 2010
Posted by Abhijit Jana in General, Tips and Tricks, Visual Studio, Visual Studio 2010.Tags: Breakpoint, Call stack, codeproject, Debugging, Programming, Visual Studio
10 comments
In my few previous blog post I have explained how we can customize the Debugging windows view during debugging of application using “DebuggerBrowseable “ attributes and “DebuggerDisplay” , then I have also explained use of “DubuggerHidden” attribute which tells the Visual Studio debugger that the method is hidden from the debugging process and while debugging. In this blog post I am going to explain one similar features of “DebuggerHidden” attributes, named “DebuggerStepThrough”
Marking a piece of code using DebuggerStepThrough attribute tells the Visual Studio debugger that, the code block will be stepped over from debugging process. you can mark methods, properties with DebuggerStepThrough attributes where you don’t want to stop your code to break.
If there is any break point inside a code section which is marked as “DebuggerStepThrough” attributes, that code block will be marked as “[External code]” in stack Trace. Where as “Debugger hidden” attributes didn’t marked is External code.
Color Indicator for Code Changes – Track Changes in Visual Studio 2010 September 14, 2010
Posted by Abhijit Jana in Tips and Tricks, Visual Studio, Visual Studio 2010.Tags: codeproject, Tips and Tricks, Visual Studio, Visual Studio 2010
15 comments
“Track Change” one of the best interesting features in visual studio which indicates the code changes with a color indicator at the beginning of the line. Generally we know about the two color indicator “Green” and “Yellow” which are used indicting the color change till VS 2008 along with those VS 2010 introduced another new color “Orange” which indicates some additional track change for undoing file after save. In this blog post I am going to explain how those color indicator helps developers to track the code changes.
In Visual Studio 2010, there is three color indicator
Green color indicates the lines which you have edited before your last save. Save again the file and green mark will be disappear.
Yellow color indicates the lines which you have edited since the last save of that file. Yellow becomes Green after saving of the file. Once you close the file that indication disappears.
This color indication has newly introduced in VS 2010. This color will come when user does an undo after a save operation for that current file. Orange color indicates that current changed line is different from the saved version of the file.
Use “Obsolete” attributes to indicate Obsolete Methods September 3, 2010
Posted by Abhijit Jana in ASP.NET, C#, General, Tips and Tricks, Visual Studio.Tags: Beginners, codeproject, How To, Obsolete, Tips and Tricks, Visual Studio
10 comments
In this post I have explained how you can use Obsolete attributes to mark some methods which are not no longer in used or may be remove in future release of the class. During the development cycle we may need to change the name or declaration of certain methods which may be using by some other developers. In this case if you changed the name or declaration of that method, application may crash in different point of times as it’s being used by other developer in the application. In this case you can use System.ObsoleteAttributes class to generate compiler warning and indicate the method as Obsolete.
Few Tips on Customizing Debugging Window View in Visual Studio August 29, 2010
Posted by Abhijit Jana in General, Tips and Tricks, Visual Studio.Tags: .NET, codeproject, DebuggerBrowsable, DebuggerDisplay, Debugging, Development Tools, How To, Microsoft Visual Studio, Programming, Tips and Tricks, Visual Studio
11 comments
In this post I am going to discuss about few tips on customizing debugging debugging windows. This may be very helpful during debugging of application. While debugging, you may want to simplify debug window or you may want to clean up all the unnecessary fields that are not important during debugging from debugging windows. Here is few tips for customization of debug window.
Use DebuggerBrowsable attribute to customize the debugging windows
Use DebuggerDisplay attribute to customize the debugging display.
To use above attributes you have to use System.Diagnostics namesapce
How to suppress compiler warning using #pragma warning directives in Visual Studio August 27, 2010
Posted by Abhijit Jana in General, Tips and Tricks, Visual Studio.Tags: Beginners, codeproject, How To, suppress compilation warnings, Visual Studio
6 comments
Sometimes during development you may need to avoid the unnecessary compiler warnings to show in warning window. Though it’s not recommended to suppress the warning explicitly, but during some debugging and analysis of code you may want to hide them for time being. In this post I have explained how you can hide the unwanted warning explicitly by specifying the warning number.
To suppress the warning you need to use #pragma warning directives in your code. Below is the syntax for the same.
#pragma warning disable <warning-Numbers>
[Line of Code ]
Let’s consider you are having the below code block and you want to suppress the warning messages.
If you are going to build the above code, you will find the below warning messages.
Set source view as default view for Web Pages in Visual Studio August 13, 2010
Posted by Abhijit Jana in ASP.NET, General.Tags: ASP.Net, Beginners, How To, Tips and Tricks, Visual Studio
8 comments
By default in Visual Studio for any web pages design view is the default view. Which may causes some time to load if your page is having many controls . So If you want to change the default view from Design View to Source View, just perform the following steps.
Go to “Tools” > “Options” and Navigate to “HTML Designer” Section.
How to setup multiple startup projects in Visual Studio ? August 11, 2010
Posted by Abhijit Jana in General, My Articles, Visual Studio, Visual Studio 2010.Tags: codeproject, How To, Start Multiple Projects, Startup Project, Visual Studio
10 comments
In this blog post I am going to describe a small tips of visual studio where you will get to know how you can launch multiple project at same time. This is quite useful when you are working on a solution which having multiple project type and you want to run few of them in same time.
Let’s assume you have a frontend application which developed using WPF and in the backend you are calling a WCF Service. Now to test the application you need both of them on running stage. By default Visual Studio project Setup type sets to “Single Startup Project” . If you set any of the project as "Start up” then that project will start when you run the application. So after that you need to run the second project also. Below is the Project setup window where you can find the all the setting related with project start up. You can open that window by right clicking on “Solution” > “Properties” > “Common Properties” > “Startup Project”
Now, if you look into the above picture you will find we have three options for project setup.
How to hide Intellisense window in Visual Studio while coding or debugging to view the code? July 31, 2010
Posted by Abhijit Jana in General, Visual Studio.Tags: Beginners, How To, Intellisense, Tips and Tricks, Visual Studio
4 comments
Here is one quick tips to hide Visual Studio Intellisense window to view the covered source code by the particular Intellisense popup. When we are working in Visual Studio and the IntelliSense window comes up, but we may want to view the code that is covered by the window. Here you go, Press the Ctrl key. Intellisense window becomes transparent and you can easily view your source code. Hold the Ctrl as long as you want them to be transparent. You can do it while debugging your application or writing code.
Below is the few snaps for the the same.
1. View Code By Hiding Intellisense Window During coding






