This might be a very simple and known to most of us, but I found it as a query in a discussion forum of one of my article “Debug your ASP.NET Application while Hosted on IIS” which was published at Code Project . Question was regarding list of worker processes in “Process Attach window” of Visual studio. Though all the sites are running properly on IIS, still he was not able to view any processes in “Attach Process Window” while trying to attach a process from Visual Studio.
Visual Studio 2010 introduced a nice new “DataTip pinning” features that enable you to better track of variable and expression while debugging. I am sure by this time you must be knowing what is “Data Tips” and different features of it. In In this Post I am going to share a small tip which talks about tracking some out of scope object using DataTips while debugging.
I am sure by this time all of you already aware of what is IntelliTrace Debugging. Just to give a quick overview, IntelliTrace is a 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. To know more details, you can see my several articles published on IntelliTrace and for step by step guide read “Debugging Application using IntelliTrace” from MSDN .
Using IntelliTrace you can capture module specific information. This is really helpful when you don’t want to debug certain modules during your debugging process. In this post I am going to discuss about how you can collect module specific information using IntelliTrace.
Daily .NET Tips is aiming to sharing useful coding tips and tricks for .NET Developers. This site completely design for sharing Tips and Tricks, useful Code Snippet which anyone use in daily development work and targeted anything related with .NET. I started with this new site few months back and with in short time period we have total 100 Tips which mainly focused on the practical oriented problem. You can find tips related with C#, ASP.NET, Silverlight, WPF, WCF, JQuery, WP7 etc.
To know more ……
Subscribe Tips to your mail box : http://bit.ly/hFAhop
For Quick Update Follow : @dailydotnettips
Looking forward more contribution from all of you.
List of few useful debugging tips and tricks
Few months back I have published an article on 10 Tips you should know about “Watch Window” While debugging in Visual Studio , where I have explained about 10 useful tips on watch window. Here I am sharing you the quick video webcast on that.
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.
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.
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. As 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.
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”.
During debugging of your application, you may need to keep track of some data which are already out of scope. Say, You call a MethodB() from MethodA() and did some operation inside MethodB(), now when you returned back to MethodA(), all the local variables inside MethodB() are out of scope. But you want to use them in MethodA(). Now here is the trick, that you can create an ObjectID for an member variables or objects and can track the same when it’s out of scope as well, but until GC() does not collect it. In this post, I am going to explore how we can use an Out of Scope object value to deal with Conditional Break points. To start with, first you have to understand how to use Object ID to track and out of scope object. Here is my complete article How to track an object which is Out of Scope while Debugging ? . Though I described a quick look into use of out of scope object inside conditional breakpoints on that article, I received few query about more details on the same. So here I am going to give some more details.
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 Garden” scenarios. 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.
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.
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.