简体   繁体   English

Visual Studio 2017中的远程调试

[英]Remote Debugging in Visual Studio 2017

I am trying to do Remote debugging using Visual Studio 2017 我正在尝试使用Visual Studio 2017进行远程调试

I downloaded the Remote Tools for Visual Studio 2017 and installed it in the remote server. 我下载了Visual Studio 2017远程工具并将其安装在远程服务器中。 In the remote server firewall, I configured to allow Inbound & outbound for msvsmon . 在远程服务器防火墙中,我配置为允许msvsmon入站和出站。 I also allowed inbound for 我也允许入境

135, 139, 445 TCP  

137, 138,500, 4500 UDP

In my machine I configured Firewall to allow Inbound and outbound for Visual Studio 2017 在我的机器中,我将防火墙配置为允许Visual Studio 2017的入站和出站

In the visual studio, attach to process, I tried the below 在视觉工作室,附加到过程,我尝试了下面

在此输入图像描述

I also tried using default connection type, but it is not able to connect to the remote machine. 我也尝试使用默认连接类型,但它无法连接到远程计算机。 What am I missing? 我错过了什么?

I am adding few more details 我正在添加更多细节

the remote machine is running Windows Server 2012 R2 My machine is running on Windows 10, I am using Visual studio 2017 远程机器正在运行Windows Server 2012 R2我的机器在Windows 10上运行,我使用的是Visual Studio 2017

This is the error message that I am getting 这是我收到的错误消息

在此输入图像描述

I am running the msvsmon as administrator in the remote machine 我在远程计算机上以管理员身份运行msvsmon

In the server msvsmon is showing the server name:port Number , but in the visual studio I am connecting using its ip:port number . 在服务器中,msvsmon显示server name:port Number ,但是在我使用其ip:port number连接的visual studio中。 Hope that is ok 希望没关系

在此输入图像描述

  • Install from : https://www.visualstudio.com/downloads/#remote-tools-for-visual-studio-2017 to the remote machine (Be sure of your source and the version of your VS) 从以下位置安装: https//www.visualstudio.com/downloads/#remote-tools-for-visual-studio-2017到远程计算机(确保您的源和VS的版本)
  • Check if "Visual Studio Remote Debugger" and "Visual Studio Remote Debugging Monitor" are allowed 检查是否允许“Visual Studio远程调试器”和“Visual Studio远程调试监视器”
  • Don't forget to Run it it's called "Remote Debugger" 不要忘记运行它称为“远程调试器”
  • And your exe 和你的exe
  • From your solution : Debug/Attach to Process... 从您的解决方案:调试/附加到进程...
  • Default : yourip:4022 默认值:yourip:4022
  • Select your process then Attach 选择您的流程然后选择

Change Connection type to Remote (no authentication) 将连接类型更改为远程(无身份验证) 在此输入图像描述

.

Change msvsmon.exe option to No Authentication 将msvsmon.exe选项更改为“ 无身份验证”

在此输入图像描述

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM