Sign in to follow this  
moonshot

Debugging help

Recommended Posts

So I'm writing a break out game in a windowed directx app. I have a bug where the wrong block is being erased sometimes, and I'm trying to debug it. I've put in some breakpoints, but when the breakpoint hits, I can't switch back over the the app to see exactly which block got erased, and which one should have. Is there anyway to do this? Do I have to do the network debug thing? Seems to me you shouldn't have to with a windowed app. Thanks much.

Share this post


Link to post
Share on other sites
If you run the app windowed, make sure it runs at the lowest resolution possible(Probably 640*480).

However, don't let any other window(Visual Studio for instance) overlap your game. Since the application "freezes" during debugging, it doesn't refresh itself anymore. Overlap a window, and you can't see what's on it, because it doesn't draw.

To see your block change, you must at least go through the render loop once, after you updated the block.

Toolmaker

Share this post


Link to post
Share on other sites
I can see the blocks change, I'm cycling through the render loop plenty of times. I don't really want to have to reduce the size of my app, and the size of my IDE window. That doesn't seem like a logical solution to me. It may work, but I'd rather go through the trouble of network debugging if that's the case. There aren't any other ways? Seems pretty stupid not to be able to see your app when you want to debug it.

Share this post


Link to post
Share on other sites
Dual monitors are good but remote debugging is even better. If you can afford to get a second machine or already have one kicking about then set it up for remote debugging, it's really not very difficult to set up if you're using .NET 2003 (as I remember it wasn't too bad even in VC6) and nothing beats it for debugging DirectX apps.

Share this post


Link to post
Share on other sites
Anybody have a good link to setting up remote debugging? I've tried the help, I've found a few tutorials(mostly for ver6 tho).

I'm using Microsoft Visual C++ .NET. I can get the Debug Monitor going on my remote machine. I can't find out how to get the local machine to use the remote machine though.

Share this post


Link to post
Share on other sites
I got it going following the instructions in the help file. Here's what I do:

1. Share the drive on your development machine (the machine where you're running visual studio) where your .exe is.

2. Use map network drive on the remote machine (where you'll be running your app) to map the shared drive from your development machine to some available drive letter, say Z:

3. On the Properties page for your project select Debugging and enter the working directory as it looks from the remote machine (e.g. Z:\projects\your_project)

4. Under Remote Settings -> Connection choose 'Remote via Pipe' (I don't know if any of the others work, that's the one I always use).

5. Under Remote Machine enter the IP address or network name of the remote machine (get the name from Control Panel -> System -> Computer Name and the IP address by opening up a command prompt and typing ipconfig)

6. Under Remote Command enter the path to your executable as it appears from the remote machine (e.g. Z:\projects\your_project\Debug\your_project.exe)

7. Run MSVCMON.exe on the remote machine

8. Hit F5 on the development machine, you should see an acknowledgement appear in the MSVCMON window on the remote machine and your app will start up. It will take longer than if it was running locally but you should start to see the usual blurb appear in the output window.

Let me know how that works out for you.

Share this post


Link to post
Share on other sites
Hmm, well I'm getting somewhere now. I've done as you said, and everything looks correct. I hit F5 to enter debug, and it says the remote machine isn't running msvcmon. Also, I don't have the pipe option, just TCP/IP or DCOM. I've tried both, neither work. In the msvcmon it says it's using TCP/IP, so I assume that's what I should use.

Share this post


Link to post
Share on other sites
Msvcmon shouldn't need to be in a particular directory - I just copy it across to it's own directory on the remote machine. I don't know why you don't get the pipe option, I think TCP/IP should work though. You need to install some additional components on the remote machine to use DCOM I think - take a look at the remote debugging help in MSDN. Maybe your firewall is causing problems? Try disabling it temporarily if you have one on both machines. Beyond that I don't know I'm afraid - it's always worked for me.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this