Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

debug information

Status
Not open for further replies.

AndyHollywood

Programmer
Joined
Oct 7, 2001
Messages
30
Location
GB
Currently to debug all my programs I am using message boxes, and these suprisingly enough are annoying me a little!

ho do i output into the debug windows inside VC++? or into a windows like you can in Java using system.out...etc...


Cheers

Andy

 
One solution is to write "> out.txt" or any other file name in project->settings->Degug->Program Arguments....

Include "iostream.h" and use the command
cout << &quot;your text&quot; << endl;

You'll then have a file named out.txt containing all your debug information...

 
If you compile using the debug configuration
you can set break points to stop the program at almost any point and then use the watch windows to look at the values of variables when it reaches a break point.

You can use the ASSERT and TRACE macros in debug. These are ignored in the release configuration so can be left in the code for debugging after release.

A third option is to write a function to dump data to a text file and look at that after the run
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top