Exception Occurred ? – Get Troubleshooting tips from your favorite blogs

In this blog post, I am going to share a quite interesting tips, where you can customize the “Exception Assistant” in visual studio.  I have explained how we can use this features for an custom exception class, where we want to provides custom or additional help information . As an example, I have shown how we can set some favorite blogs urls in troubleshooting tips section.

image

Advertisements

New Features of IntelliTrace Debugging in Visual Studio 2010 – Service Pack 1 Beta

Visual Studio 2010 Service Pack 1 Beta having some great enhancement for IntelliTrace debugging. One of the most important features is debugging 64bit application with IntelliTrace  and also debug SharePoint projects using IntelliTrace. Apart from the above enhancement, there are some changes in saving of .iTrace Log files as well.  Earlier, by default, IntelliTrace  saves IntelliTrace log files (.iTrace files) to Trace debugging storage location and there was no option to enabled or disabled the log generation. But now, You can change the storage behavior of IntelliTrace log files, or you can manually save IntelliTrace log files from IntelliTrace Window. Here I am describing the procedures.

Debugging 64 bit application using IntelliTrace – Visual Studio 2010 Service Pack 1 Beta

IntelliTrace is an new features of Visual Studio 2010 Ultimate Edition. By default IntelliTrace is enabled . During  debugging in Visual Studio, IntelliTrace works  in the background and  collect debugging information automatically and stored them in IntelliTrace Log File (. iTrace File ) . You can use the log file at any point of time to see what happened exactly at background during your live debugging. One of most draw back of IntelliTrace was to support only 32bit Application. So, If you have are running your application in a 64bit Application, you have to debug your application in 32 bit mode to deal with IntelliTrace.  If you are trying to debug an 64 bit application using IntelliTrace you will get below  message in IntelliTrace Window.

image

Does IntelliTrace support all the .NET Frameworks ?

I have been asked this question many times and also found many people have some confusion around different supported version of .NET framework by IntelliTrace debugging. imageAs IntelliTrace is new features of Visual Studio 2010 Ultimate edition and VS 2010 came up with .NET 4.0, so many may got confused that IntelliTrace  only support debugging of .NET 4.0 features. But NO. IntelliTrace is available for .NET Framework 2.0 , 3.0, 3.5 and 4.0 . So, if you are creating any application (like Window, Console, ASP.NET)  with any framework from Visual studio 2010 you can use IntelliTrace Debugging. Even if, you have an earlier application which is based on .NET 3.5 or lesser and you are running it from VS 2010 Ultimate edition, you can enjoy the IntelliTrace features.  For an ASP.NET Application based on the targeted Framework version .iTrace log will be different. Generally for ASP.NET Application IntelliTrace log file name start with the name of the process which is handling the current request.

Tips : “Remove and Sort” Namespaces using Shortcut in Visual Studio

While dealing with maintaining coding standard like stylecop warning fix with code, most of the time we need to remove unused namespaces and sort the namespaces.  We can do it easily from the context menu of  the code editor. There you have three different option for  “Organize Using” .  Either you can Remove Unused Usings , Sort Usings or we can do it together by selecting “Remove and Sort” .  Let’s see how we can make it more handy !

Tips : Set Breakpoint to multiple Functions at a same time in Visual Studio

Visual Studio having great features to set breakpoint in  multiple functions at same time.  For most of the time, to set a breakpoint  with in a function you just put a breakpoint in the first line of the function.  Now, assume you have 10 different overloaded methods or you have same function in different project, and you want to put breakpoint all of them or few of them, then it will take time to put breakpoint in each and every function.  In this post I am going to share two quick tips by which you can set breakpoint to function very easily. first one is by using “Break at Function” and second one by “Using Find Combo Box”.

How to Use ASP.NET “Property Pages” to create or host a Silverlight application in ASP.NET Site ?

While creating a Silverlight application in Visual Studio 2010, after providing the application name, IDE asked for whether you want to host the Silverlight application in a new ASP.NET web site or not. If you select the “Ok” button , Visual Studio will create a ASP.NET Site to host the corresponding Silverlight Application. So whenever you will run the Silverlight application, ASP.NET site will automatically host the Silverlight file  But suppose you have an existing Silverlight Application and you want to host it in a ASP.NET site in a similar way that New Silverlight project does  or you want to add a new Silverlight application which will automatically host inside your current asp.net web site? Do you know we can easily achieve this using “Property Pages” of an ASP.NET Application. Let’s explore how we can do that.

Use Shortcut or Context Menu for “Open Containing Folder” in Visual Studio

Open Containing Folder” is one of  the frequent used functionality to open a particular file location  in windows explore from Visual Studio IDE . How did we do that ? Yes it’s very simple, Just right click on file from files Tab and select “Open Containing Folder” from the context menu as shown in below.

1

This will open the selected item location in windows explorer. This operation by default having no keyboard shortcut. But do you know we can assign keyboard shortcut for the same or even we can customize the context menu in code editor to achieve the same as shown in below images.

4 5

Using Silverlight Chart Controls With SharePoint 2010

In this blog post I am going to explain how we can use Silverlight Chart Control with SharePoint 2010. Overall SharePoint 2010 supports fully integration with Silverlight application either of Silverlight In Browser  or as a Silverlight OOB ( Out Of Browser) applications. In this blog post, I will be using one Share Point List to read the data using SharePoint Client Object Model (OM) and display them using Silverlight Chart Control inside SharePoint as a SharePoint Out of the box Silverlight  Web Parts. This is also  an example High Touch Integration of Silverlight and Share Point 2010.

How to use IIS Manager to get Worker Processes (w3wp.exe) details information ?

In one of my previous blog post, Identifying Worker Process (w3wp.exe) – IIS 6.0 and IIS 7.0 for Debugging ASP.NET Application  –  I have explained about how we can identify the list of currently running worker process  using command prompt while we need to attach process from visual studio . But do you know for IIS 7.0 and IIS 7.5 we can get the worker process (w3wp.exe) details like Application Pool name, Process ID, CPU Usages from IIS Manager itself. Even you can get details of each worker process for a “Web Gardenscenarios.  So when you need to attach some process for debugging from Visual studio, Instead of going to command prompt, you can easily identify the worker process Id from IIS itself.   

2 

Multipurpose Find Combo Box in Visual Studio

Most of the time we use Visual Studio find combo box (6 ) only for search contents with in the solution. But the find combo box is something more than what we  know. We can use the find combo box in different purpose like create file, open files, create project, print, open watch windows etc. As for example you can close all the open files by just typing  “>CloseAll”  with in find combo box followed by a  “Enter”.  Fundamentally we can execute all the commands from Find Combo box which are available from Visual Studio Command Window. Like Command Window,  In Combo Box, if you type “>” and aliases and press enter result will be the same.

10 Tips you should know about “Watch Window” While debugging in Visual Studio

Watch windows is one of most commonly used debugging tool with Visual Studio. We generally used to explore the objects, values, properties and other nested objects as a tree structure. Most of the time we used watch window to only view the values or change the current object properties values to see the effects of changed object during debugging. But we can use watch windows for many different  purposes. In this blog post I am going to show 10 Tips, that may help you while dealing with Watch Window. 

How to track an object which is Out of Scope while Debugging ?

In Mastering in Visual Studio 2010 Debugging article I have discussed about the basic of Object ID creation while debugging. I received some request from some readers to explain the use of “Make Object ID” in details. In this blog post I am going explain how we can track an Object which is already out of scope using by creating a Object ID while debugging.

By using “Make Object ID” option we are informing Visual Studio Debugger to keep track of that object no matter it’s within scope or out of scope for the current context.  We can create “Object ID” either from Locals, Autos or from Watch Windows. Object ID is a integer number followed by a pound (#) sign. When we create Object ID for an particular object, Visual Studio Debugger ( CLR Debugging Services )  use an integer value to uniquely identify the object. This “Object ID” allows you to get the object details even if it is out of scope.

Silverlight Task Control For SharePoint 2010 – Example of High Touch Integration

SharePoint 2010 supports fully integration with Silverlight application either of Silverlight In Browser  or as a Silverlight OOB ( Out Of Browser) aplications. In this blog post I am going to explain about High Touch Integration with Silverlight and Sharepoint using SharePoint 2010 Client Object Model (OM) with one example of Silverlight Task Lists for Sharepoint. I have also explained how to host a Silverlight web parts with in SharePoint using Sharepoint Out-Of-the-Box Silverlight Web Parts. As per my understanding below is the over all diagram for a High Touch Integration of Silverlight and SharePoint 2010

OverallHighTouch

From the above diagram we can see, that we have SharePoint Client Object Model (OM) and  Services, Which can be consumed by a Silverlight Application.  Object model and services is not only for Silverlight, you can use them for different client applications.