Jump to content
  • Advertisement
Sign in to follow this  
michael879

output for debugging

This topic is 4862 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

ok in C++, using directX, how do you output easily for use in debugging? The only way I know how to output anything is rly complex and currently is what Im having a bug with. iostream doesnt work for me for some reason, but Im guessing its because of directX, cause it works in other programs I make. I just need something simple like cout << "blah";

Share this post


Link to post
Share on other sites
Advertisement
You could create a console window if you want real time data and output to that. Or create a logging class. For the console stuff see:

http://benryves.com/tutorials/?t=winconsole&c=all
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/console_functions.asp

I have both, works well. I log for major errors and use console for monitoring data to see why stuff doesn't work correctly.

Share this post


Link to post
Share on other sites
Try the DXTrace function as well as the DXTRACE_ERR, DXTRACE_ERR_MSGBOX, and DXTRACE_MSG macros. They're all documented in the SDK docs.

If you want a non-DX way of doing things, use OutputDebugString to dump stuff to the debug spew.

neneboricua

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!