简体   繁体   English

关于 MSVSMON.EXE 的 Visual Studio 调试错误似乎没有运行

[英]Visual Studio debug error about MSVSMON.EXE not appear to be running

I have a program which when I hit F5 to run the program it shows this error and doesn't run:我有一个程序,当我按 F5 运行该程序时,它显示此错误并且不运行:

Error while trying to run the project, Unable to start program 'F:....` The Microsoft Visual Studio Remote Debugging Monitor (MSVSMON.EXE) does not apear to be running on the remote computer ...尝试运行项目时出错,无法启动程序“F:....” Microsoft Visual Studio 远程调试监视器 (MSVSMON.EXE) 似乎无法在远程计算机上运行...

This is while the project was compiling successfully before.这是之前项目编译成功的时候。 Is there any project setting that should be set in a wrong way sometime!?是否有任何项目设置应该在某个时候以错误的方式设置!?

I'm using Visual Studio 2012 Update 2.我正在使用 Visual Studio 2012 更新 2。

I've discovered that the reason is not about downgrading! 我发现原因不是降级! It's about a tunneling software called "Proxifier". 这是一个名为“Proxifier”的隧道软件。 While it's running on the system, it causes the Visual Studio this problem. 当它在系统上运行时,会导致Visual Studio出现此问题。

I've had this happen when I have an entry in my HOSTS file to run the site locally but I've then commented it out to enable me to view live. 当我在我的HOSTS文件中有一个条目在本地运行该站点时,我已经发生了这种情况,但我已经对它进行了评论,以便我能够查看实时。

For example - the live site runs on http://my.url.com 例如 - 实时网站在http://my.url.com上运行

In VS in the Properties for the web project on the Web tab, I have the project URL set to the above. 在Web选项卡上的Web项目的属性中的VS中,我将项目URL设置为上面的。 When I want to debug locally, I put the following in my HOSTS file 当我想在本地调试时,我将以下内容放在我的HOSTS文件中

127.0.0.1    my.url.com

When I'm done and I want to revert to live I comment this out 当我完成并且我想恢复生活时,我会对此进行评论

#127.0.0.1    my.url.com

If in the future I need to debugt again, VS attempts to debug against the live server rather the request being routed back to localhost via the HOSTS entry. 如果将来我需要再次调试,VS会尝试针对实时服务器进行调试,而不是通过HOSTS条目将请求路由回localhost。

I you are running Proxifier add a rule to route ::1 (IPV6 Loop-back) Direct and not via the proxy. 我正在运行Proxifier添加规则到路由:: 1(IPV6环回)直接而不是通过代理。

IPV6 Visual-Studio调试修复

IIS >> Application Pool >> choose pool >> advance setting >> Enable 32-bit Applications=true. IIS >>应用程序池>>选择池>>高级设置>>启用32位应用程序= true。 It's worked for me. 它对我有用。

You must have killed the msvmon process by mistake. 你必须误杀了msvmon进程。 I know it sounds stupid but try restart VS and if that doesn't work then try a machine reboot. 我知道这听起来很愚蠢,但尝试重新启动VS,如果这不起作用,请尝试重启机器。 But I noticed that when we run VS, the msvmon process will be running in the background. 但是我注意到当我们运行VS时,msvmon进程将在后台运行。

Here's a couple things to try: 这里有几件事要尝试:

For me my Project URL( in project properties ) was over ridden with a setting from another team member for some reason. 对我来说,由于某种原因,我的项目URL(在项目属性中)被另一个团队成员的设置覆盖了。 I simply needed to set it back to me: 我只需要把它还给我:

在此输入图像描述

also you could try setting your server to use IIS Express if you're not already running that. 您也可以尝试将服务器设置为使用IIS Express,如果您尚未运行它。

Try to select 'Local Machine' , when you run the application. 运行应用程序时,尝试选择'Local Machine' It looks like Remote Machine is selected for debugging. 看起来选择Remote Machine进行调试。

在此输入图像描述

Also check the details of this error on MSDN 另请在MSDN上检查此错误的详细信息

When you try to do remote debugging, you might receive this error message. 当您尝试进行远程调试时,您可能会收到此错误消息。 It means that Visual Studio could not find an instance of the Visual Studio Remote Debugging Monitor on the remote computer. 这意味着Visual Studio无法在远程计算机上找到Visual Studio远程调试监视器的实例。 The Visual Studio Remote Debugging Monitor is required for remote debugging to work. 远程调试需要Visual Studio远程调试监视器才能工作。

I have this regularly on VS 2013 and Windows 8.1 on a 64 bit PC. 我经常在64位PC上使用VS 2013和Windows 8.1。 It disappears if you go to the start project, open the project properties, go to the 'Build' tab and change the 'Platform target' from 'Any CPU' to 'x86'. 如果您转到启动项目,打开项目属性,转到“构建”选项卡并将“平台目标”从“任何CPU”更改为“x86”,它就会消失。

I had this issue as well. 我也有这个问题。

The solution was to correct the entry for my computers hostname in my hosts file to the correct IP. 解决方案是将我的hosts文件中的计算机主机名的条目更正为正确的IP。

The story behind: I originally put the entry in the hosts file because VS was taking around 1 minute (yes 60 seconds) to enter debug mode. 背后的故事:我最初将条目放在hosts文件中,因为VS大约花了1分钟(是60秒)进入调试模式。 I discovered that putting an entry in my hostes file containing my PC's IP and its host name caused VS to enter debug mode in 1-2 seconds!! 我发现在我的hostes文件中放入一个包含我的PC的IP和主机名的条目导致VS在1-2秒内进入调试模式!

Might also be worth mentioning that I, in property pages -> start options have configures VS to "Don't open a page. Wait..." and "User custom server" and set "Base URL" to the website on my local IIS 可能还值得一提的是,我在属性页面 - >启动选项已将VS配置为“不要打开页面。等待...”和“用户自定义服务器”并将“基本URL”设置为我本地的网站IIS

Try this: 试试这个:

Step 1-> go to Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\Remote Debugger\\x64 and run msvsmon.exe as administrator.Then you will get a window stating Msvsmon started a new server named *****. 步骤1->转到Program Files(x86)\\ Microsoft Visual Studio 14.0 \\ Common7 \\ IDE \\ Remote Debugger \\ x64并以管理员身份运行msvsmon.exe。然后你会看到一个窗口,说明Msvsmon启动了一个名为****的新服务器*。 在此输入图像描述

Step 2-> Click on attach process and Enter the same server name that you get in the Remote debugger window in the Qualifier column of visual studio and click on refresh. 步骤2->单击附加进程并输入您在visual studio的“限定符”列中的“远程调试器”窗口中获得的相同服务器名称,然后单击“刷新”。

在此输入图像描述

step 3-> Now attach your process from the list.It will work. 步骤3->现在从列表中附加您的进程。它将工作。

Note: The Qualifier Value in VS and Server name in Remote debugger must match 注意:VS中的限定符值和远程调试器中的服务器名称必须匹配

If It doesn't work then stop your Remote debugger process in background and follow these steps freshly 如果它不起作用,则在后台停止远程调试器进程并重新执行这些步骤

I just had this problem after rebooting my router. 重新启动路由器后我才遇到这个问题。

It turns out that the reboot assigned my devices IP addresses again, but in a different order. 事实证明,重新启动再次分配了我的设备IP地址,但顺序不同。 For example, in my Hosts file, I had my IP down as 192.168.0.3, but when I checked it again with ipconfig in command prompt, the IP address was 192.168.0.4. 例如,在我的Hosts文件中,我的IP下降为192.168.0.3,但是当我在命令提示符下使用ipconfig再次检查它时,IP地址为192.168.0.4。

So if you run into this issue, check that the IP address in your Hosts file matches your current IP address as it may have changed! 因此,如果您遇到此问题,请检查Hosts文件中的IP地址是否与您当前的IP地址相匹配,因为它可能已更改!

If you came here because of an Azure problem, then check this out: 如果您因为Azure问题来到这里,请检查一下:

Try attaching manually the debugger: 尝试手动附加调试器:

I have outlined the steps in the following answer: 我已经概述了以下答案中的步骤:

https://stackoverflow.com/a/35738995/1057052 https://stackoverflow.com/a/35738995/1057052

If it's a Web Application, Simply just go to your Application Pool which your project is using, Right-Click, Advanced Settings , Enable 32-Bit Application = true . 如果它是Web应用程序,只需转到项目正在使用的应用程序池,右键单击, Advanced Settings ,启用32-Bit Application = true

It should work. 它应该工作。

This worked for me: 这对我有用:

1) Do not change anything on your machine and try step # 2 before repairing your Visual Studio. 1)在修复Visual Studio之前,请勿更改机器上的任何内容并尝试步骤#2。

2) Launch Visual Studio as a ADMINISTRATOR. 2)启动Visual Studio作为管理员。 Then open your Solution and try to debug. 然后打开您的解决方案并尝试调试。

You can just go to debug settings, check the box in the debugging tab 您可以转到调试设置,选中调试选项卡中的框

"use remote machine" “使用远程机器”

and type in some name (doesn`t matter if the machine exists) 并输入一些名称(如果机器存在则无关紧要)

Save settings, run with configuration and after an error simply uncheck "use remote machine" again. 保存设置,使用配置运行,并在发生错误后再次取消选中“使用远程计算机”。

Visual Studio will set the debugging to local debugging again and that should fix the issue. Visual Studio将再次将调试设置为本地调试,这应该可以解决问题。 I think this is better than shutting down programs or altering settings that are not the root cause. 我认为这比关闭程序或更改不是根本原因的设置更好。

I had this problem when attempting to deploy a JavaScript UWP app to Xbox One, due to the target architecture that I had selected (x64). 尝试将JavaScript UWP应用程序部署到Xbox One时,我遇到了这个问题,原因是我选择了目标架构(x64)。 Changing this to Any CPU allows me to deploy to the console. 将此更改为任何CPU允许我部署到控制台。

I had this happen to me today in a C# project when I added a linkLabel to the form to access a web page. 今天我在C#项目中遇到了这个问题,当时我在表单中添加了一个linkLabel来访问一个网页。

I found the cause was an entry in my hosts file for a ethernet tap interface (tinc vpn). 我发现原因是我的hosts文件中的一个条目,用于以太网分接接口(tinc vpn)。 I had an entry in there for an alias of my own machine on the tap IP address. 我在那里有一个条目,用于在自来水IP地址上找到我自己机器的别名。 Commenting it out allowed the debugger to run with no issues. 将其注释掉可以使调试器无问题地运行。

Many thanks for the hint above about the hosts file; 非常感谢上面关于hosts文件的提示; it lead me in the right direction! 它引导我朝着正确的方向前进! Hope this may help someone else. 希望这可以帮助别人。

I also had the same problem..I had this problem while I was using Visual Studio 2012 Update 5. 我也有同样的问题..我在使用Visual Studio 2012 Update 5时遇到了这个问题。

The following link gives more better explaination on different scenarios in which this error might occur. 以下链接可以更好地解释可能发生此错误的不同方案。 https://msdn.microsoft.com/en-us/library/ms164726.aspx https://msdn.microsoft.com/en-us/library/ms164726.aspx

Link says that Visual Studio is a 32-bit application, so it uses the 64-bit version of the remote debugger to debug 64-bit applications. Link表示Visual Studio是一个32位应用程序,因此它使用64位版本的远程调试器来调试64位应用程序。 The two processes communicate using the local network within the local computer. 这两个进程使用本地计算机内的本地网络进行通信。 No traffic leaves the computer, but it is possible that third party security software may block the communication. 没有流量离开计算机,但第三方安全软件可能会阻止通信。

So what I did is I opened Firewall settings. 所以我做的是打开防火墙设置。

Control Panel-->System and Security-->Windows Firewall-->Allowed apps to communicate through windows firewall 控制面板 - >系统和安全 - > Windows防火墙 - >允许的应用程序通过Windows防火墙进行通信

And added MSVSMON.exe to the allowed apps list.This worked for me. 并将MSVSMON.exe添加到允许的应用列表中。这对我有用。

Note: You can find MSVSMON.exe file on following location: 注意:您可以在以下位置找到MSVSMON.exe文件:

C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\IDE\\Remote Debugger\\x64 C:\\ Program Files(x86)\\ Microsoft Visual Studio 11.0 \\ Common7 \\ IDE \\ Remote Debugger \\ x64

Do this for your debug configuration. 为调试配置执行此操作。 But uncheck in Release configuration. 但取消选中Release配置。 以32位运行

This occurs when you try to run your project on IIS instead of IIS express and your Visual Studio is unable to connect to the Website on IIS. 当您尝试在IIS而不是IIS express上运行项目并且Visual Studio无法连接到IIS上的网站时,会发生这种情况。

If your website is not binded to localhost and you have given a domain name binding, you need to make sure your host file (Run->drivers->etc->hosts) has an entry pointing to that domain name. 如果您的网站没有绑定到localhost并且您已经提供了域名绑定,则需要确保您的主机文件(Run-> drivers-> etc-> hosts)具有指向该域名的条目。

当我将devenv.exe添加到防火墙排除项时,我的问题已解决

The root cause of the problem is not always the same so this is a useful check list to perform (I'm assuming that in the project settings Configuration Properties -> Debugging -> Debugger to launch: is set to Remote Windows Debugger ):问题的根本原因并不总是相同,因此这是一个有用的检查列表(我假设在项目设置中Configuration Properties -> Debugging -> Debugger to launch:设置为Remote Windows Debugger ):

  1. VS is running as Administrator privileges VS 以管理员权限运行

    In this case Windows defender may prevent the devenv.exe process to initiate communication towards an IP different than 127.0.0.1.在这种情况下,Windows Defender 可能会阻止devenv.exe进程向 127.0.0.1 以外的 IP 发起通信。 If you can't run VS as normal user try this command in a Powershell prompt (Run it as Administrator):如果您无法以普通用户身份运行 VS,请在 Powershell 提示符下尝试此命令(以管理员身份运行):

    set-mppreference -EnableNetworkProtection 0 . set-mppreference -EnableNetworkProtection 0

  2. The VS computer can't resolve the hostname specified in the Remote Debugging settings VS 计算机无法解析远程调试设置中指定的主机名

    In the project settings Configuration Properties -> Debugging -> Remote Server Name replace the hostname with its IP address (and the related port if the msvsmon.exe process is listening on a port different than the default. See here what is the default port for your VS version).在项目设置Configuration Properties -> Debugging -> Remote Server Name 中,将主机替换为其 IP 地址(如果msvsmon.exe进程正在侦听与默认端口不同的端口,则使用相关端口。请参阅此处的默认端口是什么您的 VS 版本)。

  3. The VS computer can't connect to the computer which is running the Remote Debugger VS 计算机无法连接到运行远程调试器的计算机

    The remote debugger requires at least these ports 4020 , 4021 , 135 and 445 .远程调试器至少需要这些端口4020,4021,135445。 As if things aren't complicated enough the default port is not always 4020 but change for each VisualStudio version (for example it's 4024 in VS2019).好像事情还不够复杂,默认端口并不总是 4020,而是每个 VisualStudio 版本都会发生变化(例如在 VS2019 中是 4024)。 Take a look here .看看这里 The simplest and most effective way to check if the ports are opened and the communication between the two ends are working correctly is to install nmap on both computers.检查端口是否打开以及两端通信是否正常的最简单有效的方法是在两台计算机上安装nmap Note that the nc command in cygwin is not the same implementation of NetCat and is not useful for our tests.注意, ncCygwin的命令是一样执行的netcat,是不是我们的测试非常有用。 Run this command on the computer which needs to run the Remote Debugger (don't run msvsmon.exe during the test) :在需要运行远程调试器的计算机上运行此命令(测试期间不要运行msvsmon.exe ):

    ncat -v -l <host_ip> <port>

    and then run this command on the computer which is running VisualStudio:然后在运行 VisualStudio 的计算机上运行此命令:

    ncat -v <host_ip> <port>

    Note that host_ip is the ip of the computer which is running the Remote Debugger.请注意, host_ip是运行远程调试器的计算机的 ip。 If the connection is received on that host then no firewall is blocking the communication.如果在该主机上接收到连接,则没有防火墙阻止通信。 In that case you should see something like this in the remote host: Ncat: Connection from xxx .在这种情况下,您应该在远程主机中看到类似这样的内容: Ncat: Connection from xxx You can repeat the test for the port 4020 and 4021 .您可以对端口40204021重复测试。 Note that the port 4020 can be changed in the Remote Debugger interface and as already said the default port is not always 4020 but change for each VisualStudio version.请注意,端口4020可以在远程调试器界面中更改,并且如前所述,默认端口并不总是4020,而是针对每个 VisualStudio 版本进行更改。

    You probably need also other ports to authenticate (if authentication is enabled on the Remote Debugger) and to deploy files on the remote computer.您可能还需要其他端口来进行身份验证(如果在远程调试器上启用了身份验证)并在远程计算机上部署文件。 You can run the same command您可以运行相同的命令
    ncat -v <host_ip> <port> on the computer which is running VisualStudio. ncat -v <host_ip> <port>在运行 VisualStudio 的计算机上。 and check the following ports: 135 and 445 .并检查以下端口: 135445 Note that in this case you don't need to run nmap on the remote host (the services are already listening on that ports).请注意,在这种情况下,您不需要在远程主机上运行 nmap(服务已经在该端口上侦听)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio 2019 - msvsmon.exe 意外退出。 .net 核心 1.1 项目将中止调试 - Visual Studio 2019 - msvsmon.exe unexpectedly exited. Debugging will be aborted with .net core 1.1 project 远程调试msvsmon.exe VS2015或无法附加到进程时表达式计算器中的内部错误。 rpc服务器不可用 - Internal error in the expression evaluator when remote debugging msvsmon.exe VS2015 or unable to attach to the process. the rpc server is unavailable Visual Studio 解决方案的 .exe 未运行 - .exe of a Visual Studio solution not running 从Visual Studio调试独立的exe - Debug a standalone exe from Visual Studio 在Visual Studio 2008中附加哪个程序来调试.NET Winforms exe - Which process to attach to debug the .NET winforms exe in visual studio 2008 Visual Studio生成错误“此版本的NuGet.exe与您正在运行的Windows版本不兼容。” - Visual Studio build error “This version of NuGet.exe is not compatible with the version of Windows you're running.” 运行Hello World的Visual Studio Professional 2012 svhost32.exe错误 - Visual Studio Professional 2012 svhost32.exe error running hello world 如何在Visual Studio 2010中调试带有附加到进程的build.exe - How to debug a build .exe with attach to process in visual studio 2010 Visual Studio-使用exe进行后期制作时出错 - Visual Studio - Error in post-build with exe 与在Visual Studio中运行相比,WPF exe运行速度非常慢 - WPF exe running very slow compared to running in Visual studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM