Archived

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

debugging full screen applications in Visual C++

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

Hey all, Newbie to the forum here...and I was wondering if anyone could help. I''ve been playing around with game programming lately, but my app keeps crashing...so I was wondering what was a good way to debug full screen applications. I have a dual monitor setup going, and I was hoping to use Visual C++''s debugger. However, when I try to step through the program, my app quits on me when it hits a direct draw call, so in essense, I really have no way of pin-pointing when my application crashes. Am I missing settings in Visual C++? Does anyone have good techniques for full screen app debugging? How do game programmers debug their programs? Thanks Wil

Share this post


Link to post
Share on other sites
Actually, this is an interesting topic, I would like an answer to it as well. If I''ve tried to debug my stuff, I usually have to shut VC++ down once the DirectX stuff hits. Any information would benefit us both

If anyone out there using VC++ could help, I''d appreciate it.

Thanks


Dave

Share this post


Link to post
Share on other sites
I would like to know a good way to do this also.... Usually when I debug a full screen app, it doesn''t crash, it hangs, so I can''t access the VC debugger.

The Shaz



"I don''t want to be a pie... I don''t like gravy." - Babbs, Chicken Run

SuperNova Games

Share this post


Link to post
Share on other sites
This is the fact: you can''t use MSVC''s debugger while in DX fullscreen mode. It just won''t work. There''s no way around it. Anyway, you should be creating the program in windowed mode first and THEN porting it to full screen. Its MUCH easier to debug that way.

Share this post


Link to post
Share on other sites
i debug fullscreen apps using the ms vc remote debugger...
but u will need 2 networked machines both with visual c++.
Enable remote debugging by setting the remote debugging ip address and set the remote directories. (tcp/ip only)
Then run msvcmon.exe on the remote computer..
When you run the app, it will run on the remote side and the debugger on the local site.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hmmm,

I haven''t tried it, but what about the option in the DirectX 8 control panel:

DirectDraw tab -> Advanced Settings ->
"Enable multi-monitor debugging"

Perhaps Microsoft has a solved this problem with DirectX 8?

Has anybody tried this?

Of course, it may not help the initial poster if they are not using DirectX 8.

Traditionally, I have either used windowed mode, or debugged via a network connection.

Share this post


Link to post
Share on other sites
I have said this before, and I say it again:
Don''t develop/debug in full-screen.

Your app can''t do windowed or requires special tricks in middle? Well, excuse ME for doing it right. Any app that doesn''t work transparently and equally well in windowed mode as in full-screen isn''t worth the effort.

It''s a cruel world.

Share this post


Link to post
Share on other sites
I think multi-monitor debugging worked in previous versions of Directx too. Haven''t tried it though, but I''ve heard it should work. If I remember correctly I even read it in the dx7 docs.

Share this post


Link to post
Share on other sites
I do full screen debugging using a voodoo2 card (I have a RivaTNT2 on the same machine )

Connecting one monitor to the voodoo port and another to the Riva, gives me FS grapics on the voodoo with VC++ debugger on the other. You need to play with the setting of the window type during setup though (can''t tell you what they are as I''m not at my development computer right now...)

Steve T.

Share this post


Link to post
Share on other sites
quote:
Original post by Zook

Ok, so what''s the disadvantages debugging in fullscreen?


You mean other it requiring more time, effort, and hardware? Prolly none...


- Houdini

Share this post


Link to post
Share on other sites
I still think that it would be convenient not having to bother with window mode in some cases. If you happen to have all that hardware, exactly what time and effort does it require that windowed debug doesn''t?

Share this post


Link to post
Share on other sites
yea! I''m happy people replied.

the reason I asked was that I was just playing around by writing my own line and blitting functions under directx. It looked fine windowed, but for some reason, under full screen, it was ''displaced''...I got diluted copies of the line across the screen, almost as if the y offset was incorrect in full screen.

In any case, whatever the solution to this particular problem, I figured that this problem of debugging in full screen might pop up again later, and wanted to ask.

Wil

Share this post


Link to post
Share on other sites
quote:
Original post by Countach

Yeah, HWay is right.
Besides, its easy to implement. Take a look at the sample code that comes with the SDK (the D3DFrame code). Its well worth the effort.


Just clarifying... The sample code will help with writing apps windowed and then porting it to full app?

Wil

Share this post


Link to post
Share on other sites
quote:
Original post by steve_t

I do full screen debugging using a voodoo2 card (I have a RivaTNT2 on the same machine )

Connecting one monitor to the voodoo port and another to the Riva, gives me FS grapics on the voodoo with VC++ debugger on the other. You need to play with the setting of the window type during setup though (can''t tell you what they are as I''m not at my development computer right now...)

Steve T.


during the installation setup of MSVC++? Or is it some setting under some menu in MSVC++?

Wil

Share this post


Link to post
Share on other sites
quote:
Ok, so what''s the disadvantages debugging in fullscreen?


Well, didn''t we already mention the fact that on one computer with one moniter (most people that setup; only 1), the debugger / DX app hanges when switching between the fullscreen app and the debugger? That should be reason enough!

But instead of talking about the disadvantages of fullscreen, ill imply them by talkning about the advantages of windowed mode. First off, we have a working debugger . Second, it''s less strain on the hardware. Third, we can actually run other programs at the same time. Fourth, we can use things such as windows menus, message boxes, etc., without getting all that wierd distortion like in fullscreen. Fifth, you get better practice with windows programming since you have to cooperate better with windows in windowed mode, and that then leads to the sixth advantage, which is better programming habits. Seventh, your program is less likely to crash the system if it itself crashes.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by iamwil
the reason I asked was that I was just playing around by writing my own line and blitting functions under directx. It looked fine windowed, but for some reason, under full screen, it was ''displaced''...I got diluted copies of the line across the screen, almost as if the y offset was incorrect in full screen.



If you are locking a surface, and move the pointer to a specific line, you need to add the surface pitch and not the surface width.

Share this post


Link to post
Share on other sites
there is a big difference between windowed and fullscreen mode.
If you need fullscreen, dont just write the app in windowed mode, then convert to fullscreen. It is different.

Better use multimonitor or remote debugging for fullscreen, dont use windowed mode just for debugging. You will suffer from performance problems.

Share this post


Link to post
Share on other sites
Zipster: You can debug fullscreen applications on any system with two (or more) displays. Place the debugger window in one of the secondary displays, and hit Step Into to run to the line of source code that you wish to start stepping into. The only problem is that you can''t use the mouse in the debugger while a fullscreen mode app is running, but the keyboard commands aren''t too hard.

I''d still recommend writing your game so that it runs in both modes; debugging windowed mode is easy. I wrote an article on this. It''s hard to read but you may be able to make some sense of it just search for my nick in the articles section of this web site.

And a tip for you when debugging in windowed mode: you may have to play around with the DirectInput cooperative levels a bit so you don''t get DIERR_NOTACQUIRED or whatever the error is.

Share this post


Link to post
Share on other sites