We will look into this feature deeply with examples. Create a sample console application and name it as TracepointsApp as shown below:

Now add below lines to Main method for doing a sum of three numbers.
namespace TracepointsApp
{
class Program
{
static void Main(string[] args)
{
int a1 = 0, b1 = 0, c1 = 0,sum=0;
Console.WriteLine("Enter a1");
a1 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter b1");
b1 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter c1");
c1 = Convert.ToInt32(Console.ReadLine());
sum = a1 + b1;
sum = sum + c1;
Console.WriteLine(String.Format("Sum is {0}",sum));
Console.ReadLine();
}
}
}
Now, we will add a tracepoint to get sum of a1 and b1. Follow the below steps to do it.

It will show a popup for setting the values, that to be displayed in Output's Debug pane. We can display value of variables by specifying it in between {}. Here, I want only value of sum of 2 numbers and function name. So, the message to be printed will be:
Function: $FUNCTION, Sum of a1 and b1 :{sum}
We can uncheck "Continue execution" for breaking the execution on reaching the tracepoint. Run the application and clear contents of Output's Debug pane.

The output will be as shown below:

In this way, we can log other values like thread name, caller function name etc without breaking the execution of code.
Below is the list of keywords that can be used in tracepoints:
| Keyword | Value |
| {x} | Print variable x value |
| $CALLER | Previous Function Name |
| $TNAME | Thread Name |
| $TID | Thread ID |
| $PNAME | Process Name |
| $PID | Process ID |
| SFUNCTION | Current Function Name |
| $CALLSTACK | Call Stack |
| $ADDRESS | Current Statement |
I am ending up the things here. I hope this article will be helpful for all.

AshuPosted Feb 10, 2011, 9:16 PM
Thanks, your article helped me a lot. I am trying to move image on window form. But I am not getting anywhere. Please tell how can I change the Image location when I press button. I want to move image left, right, up and down.
Mahesh ChandPosted Aug 16, 2009, 10:36 PM
Good topic Sateesh. We do not have anything on this kind of topics on the site. Keep up the good work. Cheers!
Former memberPosted Aug 12, 2009, 12:23 PM
A nice informative article Thanks sir