Practical C Programming, 3rd Edition

I l @ ve RuBoard

Enabling debug printout is a nice way of getting information, but many times there is so much data that the information you want can easily get lost.

The shell or command-line interpreter allows you to redirect what would normally go to the screen to a file through the use of the >file option. For example:

buggy -D9 >tmp.out

will run the program buggy with a high level of debug set and send the output to the file tmp.out .

The text editor on your system also makes a good file browser. You can use its search capabilities to look through the file containing the debug output for the information you want to find.

I l @ ve RuBoard

Категории