How can you debug a DirectX applicaiton?

Started by
7 comments, last by DevLiquidKnight 21 years, 7 months ago
How can someone go about debugging a directx application if the window is in full screen using C++? Im sure there is a simple way to fix this I just was wondering it seems quite hard to use the debugger. When I cannot even see the screen at times. I know I can hit ALT+TAB but a few times not even this has helped and I end up having to reboot. Killer Eagle Software
Advertisement
You will either have to set up a duel monitor display or have your app run windowed if in debug mode.
You could also try remote debugging (debug on a seperate computer program is running on). I've never actually done it so I can't give you any advice further than that.

***********************
          

[edited by - Big Sassy on September 15, 2002 8:47:47 PM]
quote:Original post by DevLiquidKnight
How can someone go about debugging a directx application if the window is in full screen using C++? Im sure there is a simple way to fix this I just was wondering it seems quite hard to use the debugger. When I cannot even see the screen at times. I know I can hit ALT+TAB but a few times not even this has helped and I end up having to reboot.



You could make your software support alt-tab to switch between windowed and fullscreen mode. Then when it''s finished disable it and run fullscreen only. It requires some code for reacquiring lost devices and reloading pool managed objects like textures etc.
Windowed mode is the ''proper'' answer. There''s an article on Gamedev.net somewhere that explains how to make a game run in both windowed and fullscreen mode.

Also, learn how to debug printf-style. That is, use files as your debugger by printing out variables you''re interested in.

Lastly, get used to re-reading your code before you run it. Checking code for errors will catch quite a few and is usually quicker than stepping through with the debugger (when you will have to read the code anyway).

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]
I think you´ll find this article useful: http://www.xgames3d.com/articles/xdebug/areadxdb.htm
Remote debugging is good and it''s the simplest one. The main drawback is that you need a computer right next the one for developement. Also, the debugger will harass you with : "beatme.dll is different on remote computer. Run anyway even if you already answered yes 100 times?"

I think Windowed mode is the best, but it requires a little more work if your app isn''t windowed-able.

______________________________
Oooh, you found the horadric cube!
Editor42 ...builds worlds
I disagree, I think Dual-monitor is easier. Here''s how you do it, but it only works if you have Win98, ME, Win2K, or XP Pro. Go to a flea market, or somewhere else where you can get old crappy stuff and buy a monitor, I got mine for $5. Then get an old PCI video card (I used a Voodoo Banshee), and install DirectX Debug version. Under the DDraw tab, under Advanced Options (Not sure about this, just working off my head) Check the "Enable Multi-monitor debugging". Make sure debug mode is on, then put VC++ In the secondary monitor, then run your app. You''ll see everything in the 2nd monitor, and debug in the first.
I agree with the AP and NorthWoodsman. Dual monitor increases productivity in my mind as well. I generally have VS.NET up on my larger monitor, then other programs on my smaller secondary monitor -- E-mail, Gamedev, chat programs, etc... Less of an interruption when you don''t have to alt-tab or mouse click to check to see who sent you an e-mail.

This topic is closed to new replies.

Advertisement