Visual Studio 2013 VmWare远程调试失败

时间:2015-08-10 23:47:42

标签: c++ visual-studio debugging remote-debugging

我正在尝试在Visual Studio中进行远程调试。我安装了VmWare 11,它为我提供了我正在使用的Microsoft Visual Studio 2013插件。我确实设置了虚拟调试器配置:

Virtual Machine: path to my vmx

Remote Debugger Monitor Path: "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Remote Debugger\x64\msvsmon.exe"

Remote Debug Monitor Name: "SUPERPC"

Guest Command: <Use host's Visual Studio project command>

Shared folders: <empty>

Guest Login Credentials : user=myuser, password=mypassword

我的VmWare正在运行带有名为“SUPERPC”的PC的Windows 8,我的操作系统是Windows 7.所以我在VmWare Visual Studio工具栏中按“附加到进程”,选择我的虚拟机,并成功获取进程列表。然后我从列表中选择我的应用程序并单击附加,工作室挂起几秒钟然后:

error

这个流行音乐了。

Visual Studio控制台说:

Debugging started...
Starting the virtual machine.
Waiting for VMware Tools to start...
VMware Tools has started.
Waiting for login to complete...
An error has occurred in the application. For more information please see the log file.  Its path is listed in the About box.
An error has occurred in the application. For more information please see the log file.  Its path is listed in the About box.
Login succeeded.
Enabling shared folders succeeded
Sharing Command directory: 
  U:\project\VkMonitor\debug\ as .VkMonitor6508
Adding share folder succeeded.
Checking for running Remote Debug Monitor in the virtual machine.
Sharing Remote Debug Monitor directory:
  C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Remote Debugger\x64\ as .RemoteDebugMonitor24083
Enabling shared folders succeeded
Adding share folder succeeded.
Starting the Remote Debug Monitor: \\vmware-host\Shared Folders\.RemoteDebugMonitor24083\msvsmon.exe /nowowwarn /port 4015
Preparing the project's configuration properties for live debugging.
An error has occurred in the application. For more information please see the log file.  Its path is listed in the About box.
An error has occurred in the application. For more information please see the log file.  Its path is listed in the About box.
Debugging Failed.
The Remote Debug Monitor running in the virtual machine has been stopped. Process ID: 1900.
Removing Command share: .VkMonitor6508.
Removing share folder succeeded
Removing Remote Debug Monitor share: .RemoteDebugMonitor24083.
Removing share folder succeeded

我检查了C:\Users\pcuser\AppData\Local\Temp\vmware-pcuser

中的日志文件
11.08.2015 2:41:50: Attaching to process started...
11.08.2015 2:41:50: Checking for running Remote Debug Monitor in the virtual machine.
11.08.2015 2:41:57: Sharing Remote Debug Monitor directory:
11.08.2015 2:41:57:   C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Remote Debugger\x86\ as .RemoteDebugMonitor13246
11.08.2015 2:41:57: Enabling shared folders succeeded
11.08.2015 2:41:57: Adding share folder succeeded.
11.08.2015 2:41:57: Starting the Remote Debug Monitor: \\vmware-host\Shared Folders\.RemoteDebugMonitor13246\msvsmon.exe /nowowwarn /port 4015
11.08.2015 2:44:27: Failed to attach the debugger to selected processes.
11.08.2015 2:44:27: Failed to stop the Remote Debug Monitor running in the virtual machine. Process ID: 2816. Authentication failure or insufficient permissions in guest operating system.
11.08.2015 2:44:27: Removing Remote Debug Monitor share: .RemoteDebugMonitor13246.
11.08.2015 2:44:27: Removing share folder succeeded

是否需要做一些特定的工作来完成这项工作,或者甚至可以在Windows 8中使用它?

同样在我的虚拟机中,我可以看到Visual Studio Remote Monitor已经成功启动了消息:

"Msvsmon started a new server named 'SUPERPC:4015'. Waiting for new connections"

更新

我试图在没有身份验证的情况下进行连接,我手动运行msvsmon并禁用身份验证。结果是相同的,但生成的日志是:

11.08.2015 3:55:48: Attaching to process started...
11.08.2015 3:55:48: Checking for running Remote Debug Monitor in the virtual machine.
11.08.2015 3:56:04: An instance of the Remote Debug Monitor already running in the virtual machine will be used for this debug session.
11.08.2015 3:56:26: Failed to attach the debugger to selected processes.
11.08.2015 3:56:26: ERROR: StopMonitor(pAttachData->m_handle, pAttachData->m_monitorProcId)
11.08.2015 3:56:26: An error occurred in .\attachDlg.cpp at line 456. Error code is 0x1.
11.08.2015 3:56:26: ERROR: UnshareMonitorFolder(pAttachData->m_handle, pAttachData->m_monitorShare)
11.08.2015 3:56:26: An error occurred in .\attachDlg.cpp at line 458. Error code is 0x1.

此外,我试图运行该过程而不是附加到它。这也失败了并产生如下日志:

11.08.2015 4:01:07: Getting the list of running virtual machines on the host...
11.08.2015 4:01:07: Virtual machine found powered on: Windows 8 x64.
11.08.2015 4:01:09: VMware Tools has started.
11.08.2015 4:01:09: Login succeeded.
11.08.2015 4:01:24: Debugging started...
11.08.2015 4:01:24: Starting the virtual machine.
11.08.2015 4:01:24: Waiting for VMware Tools to start...
11.08.2015 4:01:24: ERROR: pControls->get_Item(CComVariant(itemName), &pCtrl)
11.08.2015 4:01:24: An error occurred in .\Connect.cpp at line 8782. Error code is 0x80070057.
11.08.2015 4:01:24: An error has occurred in the application. For more information please see the log file.  Its path is listed in the About box.
11.08.2015 4:01:24: ERROR: pControls->get_Item(CComVariant(itemName), &pCtrl)
11.08.2015 4:01:24: An error occurred in .\Connect.cpp at line 8782. Error code is 0x80070057.
11.08.2015 4:01:24: An error has occurred in the application. For more information please see the log file.  Its path is listed in the About box.
11.08.2015 4:01:24: VMware Tools has started.
11.08.2015 4:01:24: Waiting for login to complete...
11.08.2015 4:01:24: Login succeeded.
11.08.2015 4:01:24: Enabling shared folders succeeded
11.08.2015 4:01:24: Sharing Command directory: 
11.08.2015 4:01:24:   U:\project\VkMonitor\debug\ as .VkMonitor16077
11.08.2015 4:01:25: Adding share folder succeeded.
11.08.2015 4:01:25: Checking for running Remote Debug Monitor in the virtual machine.
11.08.2015 4:01:35: An instance of the Remote Debug Monitor already running in the virtual machine will be used for this debug session.
11.08.2015 4:01:35: Preparing the project's configuration properties for live debugging.
11.08.2015 4:01:35: ERROR: pControls->get_Item(CComVariant(itemName), &pCtrl)
11.08.2015 4:01:35: An error occurred in .\Connect.cpp at line 8782. Error code is 0x80070057.
11.08.2015 4:01:35: An error has occurred in the application. For more information please see the log file.  Its path is listed in the About box.
11.08.2015 4:01:35: ERROR: pControls->get_Item(CComVariant(itemName), &pCtrl)
11.08.2015 4:01:35: An error occurred in .\Connect.cpp at line 8782. Error code is 0x80070057.
11.08.2015 4:01:35: An error has occurred in the application. For more information please see the log file.  Its path is listed in the About box.
11.08.2015 4:01:38: Debugger->Go failed with error 0x80004005.
11.08.2015 4:01:42: Debugger->Go failed with error 0x80004005.

0 个答案:

没有答案