Virtual machines and remote debugging.

Started by
2 comments, last by cdoty 15 years, 10 months ago
I stumbled on an absolutely brilliant idea over the weekend, or at least a fairly decent one. I don't believe I've seen it mentioned before. Let me give you a little background on the problem this idea was conceived to solve. If you've ever done any remote debugging, you're aware of the massive amount of equipment required to set it up. You need two computers, including mouse, keyboard, displays, and cables. You need a network hub or router and network cables, or two wireless adapters. And then there's the space and power outlets needed. If you're lucky you can set this up permanently; could you imagine putting it up and tearing it down each time you wanted to do remote debugging? This weekend, in a spark of genius, it occurred to me that I might be able to use one of the machine virtualization packages to solve the problem. I decided to try installing Windows 98 onto a virtual machine, using the VMware player (http://www.vmware.com/products/player/), because VMWare player is available free and was already installed and 'everyone' has an old Windows 98 CD laying around collecting dust. Once I had Windows 98 set up, with the proper drivers installed, I moved the files for MSVCMon over, and configured the computer for remote debugging. I fired up Visual Studio 6 and found an old project. I nervously pressed the F5 key, hoping the remote debugger interface would disappear. In what seemed like an eternety, the remote debugging screen disappeared, indicating that the process was going to work. I only had to overcome a problem with the screen bit depth for the solution to work as I had intended it to. WMware sets the bit depth of the desktop, and available DirectDraw high color modes, to match the bit depth of the host machine. I was pleased with the my diligence. This idea probably will not appeal to the majority of game developers, but is useful for casual games, that target lower end hardware, 2D only RTS type games, and possibly standard desktop applications, that can't easily be debugged on the local system. Only VMware Fusion, for the Mac, simulates 3D graphics cards. The idea isn't limited to Windows, as the VMware player is available for other operating systems.

Check out Super Play, the SNES inspired Game Engine: http://www.superplay.info

Advertisement
As you mention, the set of hardware a virtual machine is much less than the set of hardware available in the real world, which is the world that matters.

To make it is hell. To fail is divine.

Not a bad idea, but in my experience it's much simpler to use a dual-monitor debug setup rather than a remote system. Any well-written game should be able to handle the switches between the game window and the debugger, so there isn't much need for the non-invasive style of remote debugging.

Unless, of course, you're doing something really weird that I haven't thought of [wink]

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Quote:Original post by ApochPiQ
Not a bad idea, but in my experience it's much simpler to use a dual-monitor debug setup rather than a remote system.


Most of my multi-monitor debugging experience came from early versions of DirectX, and I've always preferred remote debugging. It always seems like it was too easy to hang the machine while debugging (especially in-between a lock and unlock).

Check out Super Play, the SNES inspired Game Engine: http://www.superplay.info

This topic is closed to new replies.

Advertisement