Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Debugging in exclusive mode

This topic is 6329 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

Yep, you guessed it. The usual pain of debugging full screen stuff... I have 2 options: 1) Buy another computer and use the remote debugging feature in VC++. I tried this with my bro''s comp and it worked nicely, although I dont really want to buy another comp just for debugging. 2) Buy a PCI vid card and a monitor and do the multi-monitor thing...Now, assuming thats what I do, which monitor will get the Mouse/Keyboard changes? both? what if DInput is in Exclusive mode? has anyone had any experience here? How is this done in professional game companies? I would assume they can afford a second computer on each programmer''s desk, but is that what they do? Are there any other ways that I left out?

Share this post


Link to post
Share on other sites
Advertisement
The easiest thing to do is allow your game to run in windowed mode. Debugging is simple as pie in windowed mode and it doesn''t take very much code to setup your game to do so.

There should be a few tutorials on GameDev explaining how to do this.


- Houdini

Share this post


Link to post
Share on other sites
Well, yeah, I can always do windowed mode, but I dont really like doing it that way...I''m interested in hearing about any experience people had with debugging using the multi-monitor setup.

Also, anyone have any idea what pro game dev companies do?

Share this post


Link to post
Share on other sites
Just write to a debug file. Then you have an account of every variable at every state, and you dont have to shell out $500 for a monitor and new video card, or whatever it costs for another computer. I used a debug file and caught most of my errors pretty quickly.

Besides, I hear thats how the pros do it.

Share this post


Link to post
Share on other sites
Debug files are nice. Especially when you are interested in FPS and you don''t want to spend a lot of time writing functions to display that info on the screen... Basically write it out to a file.

If that is not to your liking, I use a duel monitor setup. My mouse is in exclusive mode so I don''t get access to it but I do get access to the keyboard. This takes a little work in that you need to know the hotkeys to get around C++...

Windowed mode is a viable option. Put a bunch of #defines everywhere to determine if it is in debug mode... then when it comes down to it, simply remove those #defines to make your game exclusive mode again...

There are a lot of ways to do it and I''m sure that the professional world varies their methods amongst these and a few others...

E.D.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by BadBros

Well, yeah, I can always do windowed mode, but I dont really like doing it that way...I''m interested in hearing about any experience people had with debugging using the multi-monitor setup.

Also, anyone have any idea what pro game dev companies do?


Um, why wouldn''t you even WANT to do that? Is it that you don''t like being able to debug real-time, or be able to change your code on the fly without recompiling/restarting the game, or both? It takes like 15 minutes to write code to allow a game to run in windowed mode, and you can reuse that code for any other game so it''s a one time thing.

I can''t understand why you''d purposely want to limit yourself to debugging with text files (unless you got the money for the multi-monitor option). I mean, is there seriously a reason you don''t want to debug in windowed mode?

Share this post


Link to post
Share on other sites
Have you considered a KVM switch? It lets you use a single monitor, keyboard and mouse with multiple computers. There are a lot of uses for a second computer beyond just debugging. You can use it for a print server and various other types of servers, testing networking code and differant platforms as well as running long running tasks on it. You could view it as a unneeded luxary, but it is only a matter of time until you need a new PC. You could pitch the old one or selling for next to nothing or you could use it.

Share this post


Link to post
Share on other sites
I use multimonitor debugging and the experience has been very positive. Here are some points on it:

-You need to get a card that''s able to disable its primary VGA output, so that it can be your secondary card. Most good cards can do this though.

-It should be very easy to set up. For me, it was just plug the monitor in and it worked in Windows. It took about 15 mins of looking through the DXSDK and experimenting with code to get it working.

-I happened to get a card that operated with a different pixel format in 16 bit color than my primary, as well as with a different linear pitch. This enables me to test on different configurations, and make sure drawing code etc is actually correct.

-The second monitor runs a lot more slowly for some reason (when I run fullscreen on it). This is a disadvantage because slow sucks, but an advantage because I get to see the game I''m debugging running more slowly, and to make sure my timing code is correct.

It''s a really cool thing. Although I think Windowed mode is probably a little easier, multimon gives you a good chance to test on different hardware without even moving the program.

You can email me if you have any more questions.

invader@hushmail.com

Share this post


Link to post
Share on other sites
I dont have two monitors or the window option, so I use a debug logfile for my game.

So, I think a log fills up nearly all debug possibilities and you even dont need to switch to an external program all the time.
It''s quite convenient.

Another good reason for choosing a logfile is the ability to display exactly the information you need and the fact, that you can view every game part (e.g. engine startup, textureload) with one look into your logfile.

A bad thing is that you sometimes looses the rest of your file on crashes.


Have a look at our game "Crashday" at www.moonbyte.de

Share this post


Link to post
Share on other sites

  • Advertisement

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!