Debugging applications in virtual machines with VMware Workstation 7 and Visual Studio 2008 SP1

Can be a hassle, that’s why I’m writing this post for you:

First of all some prerequisites:

  • VMware Workstation 7 (6.5 probably will be the same)
  • A VM, XP / Vista / 7, whatever you want
  • Visual Studio 2008 SP1

Second of all: VMware can be a little cryptic with it’s error messages so stay calm!

We start by having our sample application we want to run on the VM:


Next we click the wrench tool on the VMware toolbar in Visual Studio:

Click the wrench tool

This opens the following dialog:

Virtual Debugger Configuration Pages

For your convenience I highlighted the settings you need to change.

The following order is not the order in the window, but the order that seems the most understandable in my opinion:

Virtual Machine: The VM you want to debug into, just select a suitable vmx.

Remote Debug Monitor Path: The path to Remote Debugger folder on the host computer NOT on the guest! So for 32-bit debugging that would be:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86\msvsmon.exe

Replace x86 with x64 if you require 64-bit debugging.

Shared Folders: This one is not used

Guest Command: The command to be executed on the guest to start the application. This one was quite the hassle for me. If you leave it on the standard it will result in the following (cryptic) error:

A valid executable name has not been specified in Debugger settings. You can change this in Project > Properties > Debugging.

So instead of leaving it on default you enter this;

\\vmware-host\Shared Folders\test\application.exe

Please replace application.exe to the name of your executable!

The last item, Guest Logon Credentials, is the easiest. This should be the username and password you use to log in to the VM.

Next up is setting the shared folder between the guest and the host.

While I tried this with the Shared Folder Item in the window we just filled in, I just can’t seem to get it to work. So I bypassed this.

Go to the settings of the VM (in VMware Workstation –> VM –> Settings (CTRL+D)):


On the second tab, you take shared folders, and click add (as pointed on the picture).

On the wizard I would suggest opening the shared folder in the debug folder of your application and name the shared folder ‘test’


Enable the share in the following window, and make it read-write.

Now we can start the debugging from Visual Studio. The application will then be started through the shared folder we just created.

  • Nice, this should come in handy when testing application compatiblity on all the different Windows OS’es

  • Awesome thx!

  • sxwd

    Thank you very much. It helps me a lot

  • Farrukh

    Thanks for this useful info. I’m interested to debug my dll which I used to load in AutoCad 2012. On my machine, I have a visual studio project which launch AutoCAD and then I Load my dll in it using Netload command and when it reached my breakpoint it stops there and I start the debugging thing.

    Any clue how to achieve this if I want to run AutoCAD in VM and source code on my host ?

    Thanks a bunch

  • Calvin

    Hi Kristof,
    Thanks, this blog help me a lot. But my situation is a little different. I’m working on a Office addin, this project starts from an Office application, the Start Action of project properties is something like “C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE”. Now I want to debug this project in VM, but the question is that how to config Guest Comman to make the project start from Office application in VM?
    Thanks in advance and look forward hearing of you.

  • Finally! thank you man – tried every single solution on the web but your worked like a charm 🙂

  • Speedbones

    Thanks a lot tried to fix that cryptic Error Message for hours :a valid executable name has not been specified.

  • Wolf

    Finally got it working! Thx for showing how to config the guest command.

    The other problem i was having was when i created my virtual machine i told it not to connect to my computers network/internet and as a result VMware did not install a network adapter!

    So i would see msvsmon launch and hear visual studio beep but it could not connect to the VM, guess why :P. The fix was to right click the virtual machine in the list and click Settings… > Hardware > Add… > Network Adapter. Click Next. Select “Host-only” (because i still didn’t want it to connect to the internet). Click finish. And after the network adapter is installed restart the virtual machine.

    My configuration:

    Virtual Machine

    G:Virtual MachinesWindows 7 x64Windows 7 x64.vmx

    Remote Debug Monitor Path:

    C:Program Files (x86)Microsoft Visual Studio 12.0Common7IDERemote Debuggerx86msvsmon.exe

    Guest Command:

    \vmware-hostShared FoldersMy ProjectsVisual Studio 2013ProjectsCrystal TestCrystal TestbinDebugCrystal Test.exe

    Remote Debug Monitor Name:


    Shared Folders:

    My Projects=D:UsersWolfCopyDocumentsMy Projects

  • sanjay

    hi, can i use DOS 6.22 as guest OS in VM to debug application.?