Visual Studio 2008 Remote Debugging Error: "Unable to start program '*****.exe'" - remote-debugging

I am trying to remote debug my .exe in VS2008, but when I try to start debug I am thrown an error:
Unable to start program '*.exe'. The application has failed to start because the application configuration is incorrect. Review the manifest file for possible errors. Reinstalling the application may fix this problem. For more details, please see the application event log.
Can someone tell me what needs to be done in order to resolve this problem? Where the application event log is?

Check out (and upvote, if it works) the instructions here for installing the redistributable for VS2008.
The Application Event Log can be seen thru Administrative Tools->Event Viewer in Control Panel, accessible from your Start menu.

Related

How to setup remote debugging

I'm working with Visual Studio 2017. On a remote machine, there is Visual Studio 2012. There I start up msvsmon.exe as administrator, and in the "Tools" menu, I set "No authentication", "Allow any user to debug" (in order to be really sure that I'm not blocked because of permission issues).
On my local PC, I try to setup a debugging session, as follows:
Connection Type: Remote (no authentication)
Connection Target: Find => MachineName: "<_remote_machine>"
A ping request to "<_remote_machine>" is successful.
However now connections are found, and in the msvsmon.exe debugging monitor, no messages are seen.
What can cause this and how can I solve it?
P.s. I know that there might be mismatches between the 2012 and 2017 versions, but in that case I expect an error message to be shown in the debugging monitor, but as I said there is nothing there.
As mentioned by Jszpilewski, simply copying the "Remote Debugger" directory to the remote machine and launching msvsmon.exe from there is the start of the answer.
Following point: once the remote debugger is started, it says something like "Msvsmon started a new server named '<Machine_Name:Port>'.
On the local machine you just need to copy/paste this into the "Connection Target" box => Don't try to use the "Find" button, it's a waste of time.

Unable to connect to the Remote Debugging - Web App Azure

I am trying to remote debug an Asp.Net Core Web Application (with Web API) project deployed as an Azure App Service with Visual Studio 2017 Professional.
Followed the instructions as documented here. Essentially, using the Server Explorer-->App Service-->Attach Debugger
Also, enabled the necessary firewall ports as mentioned. The ones I opened are TCP (4022, 4023) and UDP (3702). Also, ensure remote debugger application is in allowed list of apps in Windows Firewall. Documentation for the firewall steps.
Despite all the settings, I am getting following error
System.Runtime.InteropServices.COMException (0x89710023): Unable to connect to the Microsoft Visual Studio Remote Debugger named 'essamplepoc2.azurewebsites.net'. The Visual Studio 2017 Remote Debugger (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. Please see Help for assistance on configuring remote debugging.
at Microsoft.VisualStudio.Debugger.Interop.Internal.IDebuggerInternal120.ConnectToServer(String szServerName, VsDebugRemoteConnectOptions[] pConnectOptions, CONNECT_REASON ConnectReason, Int32 fIncrementUsageCount, IDebugCoreServer3& ppServer)
at Microsoft.VisualStudio.Web.Azure.MicrosoftWeb.Operations.RemoteDiagnosticsSessionBase.ConnectToServer(String site, String user, String password)
Any suggestion would be helpful.
The issue is resolved. We had to open outbound ports 4024 for VS 2019, 4022 for VS 2017 and 4020 for VS 2015 on corporate firewall.
For more info check these out:
https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugger-port-assignments?view=vs-2019
https://learn.microsoft.com/en-us/visualstudio/debugger/configure-the-windows-firewall-for-remote-debugging?view=vs-2019
I also had this problem. I solved it by changing the Platform from 32-bit to 64-bit in Application Settings as I am trying to debug from 64-bit machine.
It seems remote debugging is not turned on for your App Service.
Open your App Service in the Azure portal and go to Application Settings. Then turn Remote Debugging to On and select Visual Studio Version to 2017.
It should look like this:
Screenshot source
I hope this helps.
First, what did NOT work. Opening the port in my Firewall did not work for me. Restarting my local machine did not work, neither did restarting the app in Azure, nor updating VS2019 with the installer. I kept getting:
System.Runtime.InteropServices.COMException (0x89710023): Unable to connect to the Microsoft Visual Studio Remote Debugger named 'empirepipedriveapi-newversion.azurewebsites.net'. The connection with the remote endpoint was terminated.
Finally, what DID work, I deleted the deployment slot and then added it again, I deleted the publish profile in Visual Studio 2019 and recreated it again, a published the app (without even recompiling it) and then WAS able to connect (I did refresh the available slots in the Cloud Explorer first just to be overly careful). I believe, and this is the 2nd time in about a year, that, on rare occasion, the deployment slot can become corrupted. I noticed this time when I published the app, it took longer and it seemed much more activity took place, leading me to believe that there was code in the old slot that was is not refreshed on each and every publish and it must have become corrupted.

Remote Debugging from VS2013 getting Unable to Connect to Remote Debugging Monitor

I'm trying to remote debug from Visual Studio 2013 to a remote server running Windows Server 2012.
I have run Msvsmon from my remote server and the Server Name in Options is FEP\build#DSS1Build1. I have set Windows Authentication and also given EVERYONE permission to Debug.
On Visual Studio on my own machine I do Attach to process and in the Qualifier field put the same Server name ie. FEP\build#DSS1Build1.
However when I press Refresh I get the message:
"Unable to connect to Microsoft Visual Studio Remote Debugging monitor... does not appear to be running on remote computer"
Is there something I need to unblock in the Firewall?
A couple of things need to be done.
On the remote server, you need to start Visual Studio Remote Debugging monitor and make sure you run it as a admin user (as otherwise you can't connect).
Make sure it is the right version (depends on if your server is 64bit or 32 bit).
Also you need to make sure that the remote debugging service is running. You can run the configuration wizard to see the status.
Then you need to put the full qualifier in as you mentioned.

Visual studio debugger not working

I am using Microsoft Visual Studio debugger to debug a remote application. These are the steps I have done
I have taken the x86 version of the msvsmon.exe in the remote machine (which has 32 bit OS) where the application to be debuggedis running. I have started the exe with the options No authentication and Allow any user to debug.
In Visual studio I set Debug option as Win32, go to Tools and Attach the process. I give the IP, choose the transport type as remote and try to start the debugger. However, I am getting the following error message --
Unable to connect to ‘MyMachine’. The Microsoft Visual studio Remote debugging monitor is either not running on the remote machine or is running in windows authentication mode.
I have checked the firewall settings. Please help if you have any idea as to what could be the issue.
If you are debugging native code then run the remote debugger in no-authentication mode. MSDN has notes here. Note that you have to connect to the remote debugger quickly (within 30 seconds) in this mode, otherwise it times-out.
Did you specify "Native debugging" in Attach to process dialog?

Getting Exception handling error while debugging the Windows Phone Test Framework by expensify

I have set up the environment for Windows Phone test Framework in Visual Studio 2010 Professional.
While debugging Unit Test using Resharper, i am getting exception handling error.
"A first chance exception of type
'WindowsPhoneTestFramework.Server.Core.AutomationException' occurred
in TechTalk.SpecFlow.DLL"
How can i fix it and run my scripts for WP7 emulator?
WPTF works by setting up a SOAP server on the desktop host which the application then connects to, it looks like the phone can't contact the host. This could be because it hasn't been setup or because it didn't have permission to start.
From the WPTF readme:
•
For some script runners, then you may need to change script runner to have the 32-big flag set - try to find a 32-bit alternative (e.g. nunit-console-x86.exe) - or (at worst) use CorFlags.exe to change your test-runner.
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\CorFlags.exe" "your target.exe" /32BIT+
•
The server part of the code opens a WCF service on http://localhost:8085 - it needs permission to do this - use:
netsh http add urlacl url=http://+:8085/ user=\
Have you tried these? It might be worth getting a developer involved if you aren't comfortable with the instructions.