views:

284

answers:

6

Given that I only have one monitor, what's the best way to debug a program which uses the entire screen (such as a DirectX application)? Tools such as the step-by-step debugger seem useless in this context. Also, printing to the console isn't as effective, since you can only look at the console once the application has terminated.

+6  A: 

Remote debugging is no option?

Else you can possibly borrow a second monitor (with video card).

And if all else fails you can go back to beep signals.

(Or find yourself an old matrix printer and write each line to the printer ;-) )

Gamecat
+4  A: 

To just see some runtime information I would overlay debug text within fullscreen. If it were me, I would target the app to be able to run windowed as well- although the onscreen debug is good for play testing (if this is a game).

Klathzazt
A: 

printf debugging is slow, painful and fool proof.

fill your code full of tracing lines like

fprint(logfile,"%s:%d\n",__FILE__,__LINE__);

or waterer you need for your language and run it. after your done, you can walk through what it did. Make sure you have lots of time and harddrive space first though. It has some advantage like that you can "run" things backwards and diff one run with the next.

BCS
A: 

I'll go with what BCS said and add that DebugView by SysInternals allows you to connect to it remotely from another machine.

Mark Allen
A: 

You can test 99% of the code in windowed mode, then for the parts that need to be done in fullscreen you can have it jump to fullscreen, run some test, and jump back soon after (either programmatically or with alt-tab).

Basically I want to stress that most code will not be dependent on the fullscreenness and could be tested in a small window.

Karl
A: 

You might want to consider reading Joseph Newcombers essay on Graphical Developers Interfaces at http://www.flounder.com/gdi.htm

You may not be coding in MFC but you should be able to get some useful ideas. He's got lots of other interesting articles as well.

This is almost completely irrelevant. He's talking about fullscreen DirectX debugging. Not just general GUI debugging.
OJ