Running msvsmon as a service in "no authentication" mode - visual-studio-2010

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.

Related

Problems debugging web role remote on Microsoft Azure

I am trying to debug a webservice remote on Microsoft Azure. The service is running in a web role.
I have configured remote debugging in the publish settings an can attach the debugger to the web role. Also, when I have selected the correct process, the debug symbols are loaded correctly and breakpoint's tool tips say that the breakpoint is hosted in "WallSHost.exe" which is the remote process.
What I would like to do, is to run a local client software which I am developing and step into the server code from there. When I step into the according service client call (F11), I get the above error message, saying (for the sake of Google in plain text here):
Unable to automatically step into server. Connecting to the server
machine 'xyz.cloudapp.net' failed. The Microsoft Visual Studio Remote
Debugging Monitor (MSVSMON.EXE) does not appear to be running on the
remote computer. This may be because a firewall is preventing
communication to the remote computer.
I have tried to disable the firewall on my (the client) machine with no effect. Has anybody seen that before or can tell me how fix this problem?
A quick checklist
deployed cloud service is a debug build
a debug build is selected from Build Configuration list (in publish wizard)
'Enable Remote Debugger For All Roles' is checked
no changes to code since deployment

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.

Remote Debugging in VS2010 - access denied

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).

VS2010 remote debugging with default transport problem

I need to do remote debugging of managed code (.NET) on a server hosted on a different network. Neither the client or server is on a domain so i have to use the public ip of the server.
I'm trying to use Visual Studio -> Attach to process -> default transport with the qualifier john#xx.xx.xx.xx but it's not working.
I get the error message : "Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named 'john#xx.xx.xx.xx'. There is no server by the specified name running on the remote computer"
This error message tells me i can connect just fine but it can't find the msvsmon instance (which is 'john#WEB-001'). So i tried to use the combination of qualifiers such as WEB-001\john#xx.xx.xx.xx and xx.xx.xx.xx\john#WEB-001 but neither are working.
If I choose the transport "Remote (Native only with no authentication)" it connects just fine and I can see the process list on the server but it is pretty much useless because I can't debug managed code.
The administrator 'john' exists on both computer with the same password
Windows 2008 R2 X64 (Server)
Remote debugging component (VS2010) X64 installed
Firewall off
Msvsmon new server named 'john#WEB-001' running as john
Windows 7 X64 (Client)
Visual studio 2010 running as john
Firewall off
Any idea how to fix this, or is this scenario not supported? Thanks
having you tried putting web-001 in your hosts file, and connecting as john#web-001?
Try adding the server name to your hosts file:
192.168.1.100 WEB-001
Replace the IP with your own. Native code debugging is done over plain TCP/IP with no security but native code requires DCOM to enforce security, I don't understand the reason but ....
I know this is an old thread now but.
When the remote debugger is first installed you can set a firewall setting that allows all web traffic or only subnet connections. Run the configuration again to allow all web traffic.
Also, as the Administrator account, not a user in the Administrator group, Shift+r-click on the debugger shortcut to execute as a different user. Enter in the other user account that has the same username and password as the machine you are debugging with, in this case john.
This is the process I have to use.

Vs 2005 remote debugging

i am unable to connect to visual studio remote debugger when it is running as windows service
I am getting this error
"Unable to connect to the Microsoft Remote Debugging Monitor named 'MyUsername#192.168.99.61' Logon failure: unknown user name or bad password"
but when i run the remote debugger through startup menu it work fine.
how to fix this?
Abdul khaliq
You are trying to connect to "MyUsername", by default, services run under "localservice". Check which user your service is running as.
Also, remote debugging requires that both the local and remote users have admin priviledges on both computers. the "localservice" user probably won't have the required permissions.

Resources