Visual Studio 2010 is one of most awesome tool to debug Microsoft.NET related code. I have found one more interesting feature with the Visual studio 2010. That is called Pin Data Tip feature. This features can be very useful when you are debugging the code with loops. Normally when you debug with the code if you want to know the value of variable then you have to put your cursor on that variable and tool tip will show the values of that variable. The pin feature will pin that tool tip and you don’t have to put mouse over there. Let’s take a simple example to examine that feature. Below is the code for that. I have created a simple for loop and I am printing variable value with Response.Write on asp.net page. Below is the code for that.
Now I have started debugging and first time code execution came to my break point. Now you can see when I put mouse pointer to that value it will show a variable I value like following.
Now as you can see there is one Icon in above code so once you click on that pin Icon that it will pin the DataTip for that variable like following.
So now whatever you debug in that loop you can see the the value of variable I at any time like following.
So that’s it. Now life become easy with this kind of new debugging features of visual studio 2010. Hope you liked it.. Stay tuned for more.. Happy Programming.
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace Blogging { public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { for (int i = 1; i <= 20; i++) { Response.Write(i.ToString()); } } } }
Now let’s put the break point on for loop like following and then start debugging via pressing F5.
Now I have started debugging and first time code execution came to my break point. Now you can see when I put mouse pointer to that value it will show a variable I value like following.
Now as you can see there is one Icon in above code so once you click on that pin Icon that it will pin the DataTip for that variable like following.
So now whatever you debug in that loop you can see the the value of variable I at any time like following.
So that’s it. Now life become easy with this kind of new debugging features of visual studio 2010. Hope you liked it.. Stay tuned for more.. Happy Programming.
0 comments:
Post a Comment
Your feedback is very important to me. Please provide your feedback via putting comments.