11
votes

I am trying to do Remote debugging using Visual Studio 2017

I downloaded the Remote Tools for Visual Studio 2017 and installed it in the remote server. In the remote server firewall, I configured to allow Inbound & outbound for 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

In the visual studio, attach to process, I tried the below

enter image description here

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

This is the error message that I am getting

enter image description here

I am running the msvsmon as administrator in the remote machine

In the server msvsmon is showing the server name:port Number, but in the visual studio I am connecting using its ip:port number. Hope that is ok

enter image description here

2
What is the remote machine? It's been a while but I remote from VS to a Raspberry with Windows 10 on it and there was a setting on the Raspberry that had to be configured in Windows in order for it to work. I'd have to dig but if you give a few more details about the remote device I may be able to help.Michael Puckett II
Thanks Micheal, the remote machine is a Windows 2012 Server R2 I have updated the question with this detail nowVignesh Subramanian
what's the error message?qxg
Is msvsmon actually running on the server?user7860670
Yes its running on the server I have updated the question with error message now, thanks for pointing it outVignesh Subramanian

2 Answers

2
votes
  • 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)
  • Check if "Visual Studio Remote Debugger" and "Visual Studio Remote Debugging Monitor" are allowed
  • Don't forget to Run it it's called "Remote Debugger"
  • And your exe
  • From your solution : Debug/Attach to Process...
  • Default : yourip:4022
  • Select your process then Attach
1
votes

Change Connection type to Remote (no authentication) enter image description here

.

Change msvsmon.exe option to No Authentication

enter image description here