Remote Debugging in VS2010 - access denied - visual-studio-2010

I have VS2010 on my dev machine (Win7) and I run a virtual machine under XP SP3 (name PC), on which I installed the VS2010 remote debugger, as well as .Net Framework 4.
On both OS I have the same user name (User), with the same password, with admin privilege, who is allowed to debug programs (Local Policy/User Rights Assignment/Debug programs). The firewall is deactivated on both.
When I debug my program through VS2010 (specifying "Start external program" and "Use remote machine"), I get
Error while trying to run project: Unable to start debugging.
Access is denied. Can not connect to Microsoft Visual Studio Remote
Debugging Monitor on the remote computer.
On the VM the Visual Studio Remote Debugging Monitor displays a line saying "PC\User connected".
If I try to attach a process using "Default" as transport and "User#PC" as qualifier, I get a similar error
Unable to connect to the Microsoft Visual Studio Remote Debugging
Monitor named 'User#PC'. Access is denied. Can not connect to
Microsoft Visual Studio Remote Debugging Monitor on the remote
computer.
Again on the VM the Visual Studio Remote Debugging Monitor displays a line saying "PC\User connected".
If I try to attach a process using "Remote (Native only with no authentication)" as transport and "PC:4015" as qualifier (changing the "Authentication mode" to "No Authentication (native only)", then it works and I see all the available processes on the VM.
Any idea on why the access is denied even if the Visual Studio Remote Debugging Monitor seems to accept the connection? Also if I 1st use "Windows Authentication" and try to start the debugger, and then I try to change the "Authentication mode" to "No Authentication", I get
Your new options can not be applied. Cannot stop server because one or
more users are currently connected.
View Msvsmon's help for more information.

I was eventually able to make it work by doing "Run as administrator" on VS.Net 2010 (I forgot that Windows 2008 and 7 are quite different when it comes to right management).

Related

Azure: Cannot connect to remote debugger

I want to use Remote Debugger in Visual Studio 2015 to attach to my site. When I try "Attach Debugger" the azure return:
The following error occurred while launching remote debugging: Unable to connect to the Microsoft Visual Studio Remote Debugger name 'XXXX'. Windows authentication was unable to establish a secure connection to the remote computer.
In azure portal I set remote debugging and select VS 2015.
These errors might be related to Local Policies > Security Options > Network Security: LAN manager authentication level. It needs to be set to “Send NTLMV2 response only”. Once this is set then the PC was able to open RemoteApp applications without problems.
To set local policies go to command prompt and type secpol.msc or Administrative Tools > Local Security Policy
Maybe your application is not enabled to use remote debugger.
To enable remote debugger in app service:
Go to Azure management portal
Select your app
Go to settings
Go to Debugging
Enable Remote Debugging
Select your visual studio debugger versión
As much as it pains me to provide this as a solution, have you tried closing and re-opening Visual Studio? (In particular if you were able to connect at one point and it stopped working.) This has solved this issue for me on multiple occasions.
Changing my network connection appeared to solve this for me. To do this, I:
Open Networking and Sharing Center
Change adapter settings
Disable the currently-active network adapter (ethernet in my case)
Enable another network adapter (WiFi in my case)
After that, Visual Studio debugged the app service.

Running msvsmon as a service in "no authentication" mode

I am trying to debug a process written in C++ that gets launched prior to user logon in a virtual machine. The VM is a member of a test domain. My dev machine is not domain-joined, so I can only use Msvsmon in no authentication mode.
I have often used no authentication mode successfully when running Msvsmon interactively. Now I am running it as a service, and when I try to connect from VS2010 I get a message saying:
Unable to connect to '192.168.56.128'. The Microsoft Visual Studio Remote Debugging Monitor is either not running on the remote machine or is running in Windows authentication mode.
How can I debug the remote process in this situation? I am open to other suggestions than running Msvsmon as a service.

Attach to Remote C++ Process with Visual Studio 2010

I have a c++ program running on a remote machine.
I'd like to debug it from my machine.
I've installed remote debugging services (msvsmon.exe ) on the server.
Firewalls are not active not in the client nor in the server.
The program is running on the server (.pdb file is also there).
In the client I open the project in VS2010 , I go to debug->attach to process.
In the qualifier field I copy the value of the server name in msvsmon.exe.
When I hit enter, I get an error prompt saying :
"Unable to connect to Microsoft Visual Studio Remote Debugging Monitor named Administrator#TESTER1, the requested name is valid, but no data of the requested type was found"
In the server, the Authentication mode in msvsmon.exe is set to Windows Authentication.
Any help will be much appreciated.
Regards,
Omer.
Take a look at:
How to: Set Up Remote Debugging from Microsoft
Remote debugging with Visual Studio 2010 from CodeProject
In your case, take note of the suggestions regarding native debugging and windows authentication.
In my experiences with remote debugging a machine that is on my local network, I bypass windows authentication and setup the remote msvsmon.exe to allow anyone to connect to port 4015. So, then in the 'Attach to Process' dialog I select Transport > Remote (Native only with no authentication) and for the Qualifier I enter TESTER1:4015 or TheIPAddress:4015 if the name of the PC cannot be resolved.

Connecting to VS2010 Remote Debugger from a domain?

I'm trying to set up a remote debugger connection from my dev box on a domain to a web server (SERVER) in a workgroup with no success and I'm hoping for the some insight.
---------------------------
Microsoft Visual Studio
---------------------------
Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor
named 'SERVER'. The Microsoft Visual Studio Remote Debugging Monitor
(MSVSMON.EXE) does not appear to be running on the remote computer. Please see
Help for assistance.
At this point, I have done the following:
I've installed the x64 debugging components, but not as a service. The monitor is up and running.
I've created an account on the workgroup machine to match my domain account in name and password.
I've granted this account the "Debug programs" right in Local Security Policy.
I've added this account the "Administrators" group.
Still I get the same error message.
Any suggestions?
You also need to create a local account on your dev box with the same name and password as your domain account.
This account just needs to exist - you don't need to run VS with it.

Cannot connect to MSVSMon running on Windows 7 x64

I have a test machine that runs Windows 7 Enterprise x64. I setup MSVSMon (tried both 64 and 32 bit versions) on it and made sure that the Firewall settings would not block the remote debugger. Now I'm trying to connect to this from my dev box running Windows 2008 R2 and Visual Studio 2010. However when I try to connect to the remote debugger, it shows me the following error message:
"Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named "xxxxx". THere is no server by the specified name running on the remote computer.
Some obvious things:
- I have verified that the name I'm using is correct (picked it up from teh MSMSMon.exe options dialog)
- The dev box does have access to the remote machine, I can check that by connecting to it's file shares.
- The same instance of visual studio is able to connect just fine to another similar test machine, but one running a 32 bit Windows 7 Enterprise.
Any ideas?
Vin
Make sure if you are debugging from VS2010,its the debugger for 2010 and not 2008, and/or vice versa
I would check your firewall is not blocking the connection. Just because you can connect to the fileshare doesn't mean it's allowing the DCOM connection to the Remote Debugger.
See http://msdn.microsoft.com/en-us/library/bt727f1t(v=VS.100).aspx
I generally run MSVSMon on the remote machine from a share on my dev machine where I have several versions of Visual Studio installed. I get "There is no server by the specified name running on the remote computer" error when I run the wrong version of MSVSMon. For example if the VS2008 version of MSVMon is running on the remote machine and I am trying to attach to the process from VS2010.
Default location of MSVMon for VS2008 :
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger
Default location of MSVMon for VS2010 :
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger
I've found alot of ppl bump into this scenario. Tried to cup the solution in my blog post:
http://livshitz.wordpress.com/2013/02/26/remote-debugging-visual-studio-unable-to-connect-to-the-microsoft-visual-studio-remote-debugging-monitor/#more-144
Here is the snippet of the solution:
Make sure firewall is not blocking your request
Make sure the installed version of Visual Studio Remote Debugging Monitor is supported by the running Visual Sutdio
Create local user on remote target, with the exact user name and password as the debugging user (that runs VS process)
If dns resolving is unavailable (source and target on different domains) open this file
"c:\Windows\system32\drivers\etc\hosts"
and add a new line at the bottom:
"xxx.xxx.xxx.xxx TargetHostName" (without quotes)
This will map the target host name with an IP.

Resources