giggle
giggle

Reputation: 1941

How to trace/output timestamp in Visual C++ 2010 while debugging

guys, VC2010 provides debugging tool "trace" which enable to output not only variable values into output window, but also some built in arguments like TID TNAME, PID, etc.

I want to make trace to output time stamp also, is this possible int VS2010?

Thanks!

Upvotes: 6

Views: 3503

Answers (2)

QuantumBlack
QuantumBlack

Reputation: 1546

You can use the predefined variable $TICK, info @ MSDN

Upvotes: 2

Dinaiz
Dinaiz

Reputation: 2233

You can output the result of an expression by using curly brackets.

If you have

int x;
x=10;
...

and you setup a trace point after x=10 witht he expression x={x}, it will output x=10 to your output window.

Just put an expression which gives you a timestamp inside the curly brackets, like timestamp={time(0)} (depending of course which API you use to get the time ....

Upvotes: 1

Related Questions