step into web service on another LAN server - visual-studio-2010

I'm debugging a vb.net windows program which I've upgraded to a VS 2010 solution, targeting Framework 2. I need to step into a webservice's code. The web service is framework 3.5, also vb.net, running on a windows 2003 server on our LAN. I've seen a ton of crap on the Net about it, mostly other people who couldn't get it working either.
The error I get in VS2010 is the exact same one I got before upgrading the project from VS 2005:
Unable to automatically step into the server. Connecting to the server
machine [servername] failed. The Microsoft Visual Studio
Remote Debugging Monitor (MSVSMON.EXE) does not appear to be
running on the remote computer. Please see Help for assistance.
So I did what Help said to do and ran the VS 2008 remote debugging wizard on the host server. I have verified that the remote debugger is running as a service on that machine. And it still fails.
Little help? THANKS

Just in case anyone comes here looking for this answer, here it is. No goofy 'Attach to Process', no weird bad instructions
from websites going off on a million stupid tangents. This answer has been FALKENIZED.
When on the same LAN and on the same domain, remote debugging from Visual Studio 2010 works when you do the following steps.
on web service host machine, share the web application folder where the web service lives; give yourself 755 permissions.
oops, give yourself wrxr permissions.
on local development machine, map a network drive to the [web service host machine][web app] folder you just shared.
copy the Visual Studio 2010 remote debugger folder (containing msvsmon.exe + support files) to web service host machine.
Make sure you get the correct platform for your host server, e.g. x86, x64, etc. Remote debugger is found here:
C:\Program Files\Visual Studio 2010\Common7\IDE\Remote Debugger[platform]
on web service host machine, drag a shortcut from the newly-copied debugger to the desktop, then start the remote debugger
on local development machine, step thru code. when reaching a call to the web service, you'll be prompted to navigate
to the location of requested web service code file, which will then be available in your mapped path. Do it.
Finally after 1000000 headaches, you may start debugging your web service. CONGRATULATIONS

Related

remote debugging in visual studio cannot connect

Hello i have a problem with remote debugging in Visual Studio (v12)
I Created windows azure account i published application to the cloud.
Then i connected to this account through remote desktop. Address of remote computer is f.e Iron.app.net
Then i downloaded there and run remote debugger. I started msvsmon.exe and it created server named:
RD0015555E2:555
And now i would like to remote debugging in my host.
i know i must attach to process. And i do it.
From Visual Studio: Debug->attach to process->Qualifier:RD0015555E2 and it cannot resolve host name.
i also tried Iron.app.net but then it shows error that it seems that msvsmon is not installed.
I dont know what should i type into Qualifier (as remote machine)?
Remote debugging is tricky to configure Windows Azure Cloud Services. Other options that you have are:
Intellitrace (in case you've got Visual Studio Ultimate)
Intensive (verbose) pro-active code instrumentation (logging) from the beginning.
Profiling Cloud Service
Chose either, and watch your logs/traces.
Or deep dive into Remote Debugging Cloud Services. I would, however use Remote Debugging as a final option, when everything else does not work and does not help me. Typically most of the issues that would pop in the cloud will also pop in when debugging locally. And if role is just recycling, you will not be able to attach debugger at all.

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.

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.

Cannot start debugger on Visual Studio 2010 (F5) However, ' attach to process' does work (slow). How to fix?

The environment:
Clean (new) install of Windows 7 64bit.
Clean (new) install of Visual Studio 2010 Professional (10.0.30319.1).
Windows Update is up to date.
The problem:
I cannot start the debugger on Visual Studio 2010 (hit F5): 'Unable to start debugging on the web server. Unable to connect to the web server. Verify that the web server is running and that incomming HTTP requests are not blocked by a firewall.'
However, 'attach to process' (what I usually do) does work, but it is painfully slow to start (Visual Studio 'thinks' a lot of time before the debugging is actually enabled).
On the same hardware, running VS 2008 on good old Windows XP (32bits), this problem never happened.
Trying to debug a site running under the ASP.NET Development Server also fails: 'Unable to connect to ASP.NET Development Server.'.
There are plenty of web pages about these errors (many very outdated and does not apply to my environment), none of them worked for me.
Notes:
No matter if I run Visual Studio as Administrator or not. The problem is
the same.
The problem happens even when running a brand new blank IIS web site, either created as 'localhost/something' or 'sample.local'.
If I create a 'File System' web site (to try ASP.NET Development Server), when I hit F5, the server starts, but after a long wait Visual Studio says 'Unable to connect to ASP.NET Development Server.'
The 'hosts' file has an explicit 127.0.0.1 entry for 'localhost' and for 'sample.local'
It's the same problem either running .NET 2.0 or 4.0.
It's the same either configuring the application pool with or without 'Enable 32-Bit Applications' true or false.
It's the same either configuring the application pool is classic or integrated mode.
In a desperate attempt, I've added all the IIS 6.0 legacy 'features' stuff (not needed!) and doesn't helped at all.
I don't now what else I can try.
Thanks.
OMG!, I'm so stupid. The most oblivious thing was truly wrong. There was a wrong rule in the firewall. Therefore, even being in 'interactive mode' (as it is was always set), the connection was denied.

Visual Studio Environment Best Practices?

I have a VM on my Win 7 machine running Server 2008. My website can't run properly unless it's running on the server due to COM+, other website integration and environment variables. Currently, I have VS2008 installed on the Windows Server 2008 and I develop there (which is dumb, I know) instead on in my Win 7 workstation. I hate this setup.
My question is, how can I developer on my workstation and then EASILY push and test th websites on the VM Server?
Access files across the network so the actual changes are made on the VM Server?
Make changes locally and publish to VM Server?
Can I set up VS2008 so that if I when I Run the application in VS2008 it pushes everything over and opens a web browser that points to the VMServer's IIS Website?
Of course, the VM is a server on your network. Exactly like any other server on your network, virtual or otherwise.
For debugging you can setup VS2008 to remote debug but I think you'd have to publish the site, start it and then hook up the debugging but I'm happy to learn that there's an easier way... anyone?

Resources