PDA

View Full Version : Why don't my print statements print when I step over them?



Josh-TotalView-Tech
07-31-2006, 11:59 AM
The output of most print statements is buffered. This means that you won't see what you are printing until the buffer is flushed. If you don't want to wait for this to happen, you can place a call to fflush() in an eval point on the line after the print statement.

http://www.totalviewtech.com/Documentation/Tips/images/EvalPoint_flushing.png

If you need to do this for a lot of print statements, you might want to use the CLI:

d1.<> set lines {1112 1623 185 2362}
1112 1113 1114 1115
d1.<> foreach line $lines {

dbreak $line -e {fflush();}
}
d1.<>