Visual Studio fail to attach to C++ process on Centos? - c++

I am trying to debug a c++ process on Centos7 using Visual Studio 2017. But I am not using a Linux Project built by VS, just want to attach to remote linux process using ssh. I have done the same things on a ubuntu16.04 machine, all thing works fine, but not in this time on Centos7.when I try to attach,VS allertcan not connect to remote host,unsupport operation,unknow error 0x8004005
Does anyone know why?

Related

How to make Visual studio Remote debugger 2017 and 2019 both work on a same computer?

VS2017 remote debugger had been working well until some developer replaced it with VS2019 version.
I know them can both work on the same computers since they use different ports (4022 and 4024).
On this computer I already shut down the remote debugger 2019, and ran debugger 2017. It prompts such message:
Unable to configure this computer to allow remote debugging. The
system cann't find the path specified.
I don't know why.
Just turning-off the firewall solved the problem.

Error when Visual Studio Remote Debugging with GDB

I have a sample c++ application which builds and runs fine in a Red Hat installation.
I wanted to have the source code of this application in my windows machine so I can create a Visual Studio project and use Visual Studio 2017's new features which makes it possible to build and debug programs on a Linux server.
I successfully managed the following
Create a 'make file' project using Visual Studio CE 2017
Connect to the remote server and build by invoking make command at
the server
My remote debugger settings are as follows
Remote Build Settings are as follows
General Settings are as follows
However, when I try to debug the program via Visual Studio (using gdb in the server) following error occurs
Since this doesn't reveal much, I enabled verbose mode (in GDB) and following is the verbose output. Apparently, GDB crashes after loading symbols for one of the source files.
Furthermore, I can manually GDB the binary in the Linux Server without any problems

Unrecognized error occurred in the Windows Web Services framework

I'm trying to build and run a simple project in Visual Studio 2017 (C++) in x64 using the Local Windows Debugger. However every time I try to run it using the debugger I get this error.
This error doesn't show up when I change it from x64 to x86, but I need it to compile to x64. This has happened on both computers that I've tried it on, and seems to happen in every one of my projects. I've tried reinstalling Visual Studio already and nothing's changed. I've tried adding 'devenv.exe' as an exception to the Windows Firewall but no changes there either, even when I disabled the firewall completely. My antivirus isn't affecting it at all either: still happens when I disable it.
The application runs fine when I find it in the explorer and run it manually but then I don't have any debugging tools.
What am I doing wrong here, how do I make it build and run my project as x64?
I get this error every time I have an active VPN connection. If you use a VPN, try disconnect and see if the error disappears.
If you want to use a VPN, the solution (assuming you have Visual Studio 2017 Version 15.7 or later) is as follows:
Go to the Windows Start Menu and launch the “Developer Command Prompt for VS 2017 Preview”
Run: "%DevEnvDir%vsregedit.exe" set "%VSINSTALLDIR:~0,-1%" HKCU Debugger UseAnonymousPipes dword 1
Restart VS if it is already running
That solution is from this link to Microsoft.

Debug a process in a VM

I'm developing a program in C++ and I'm facing a problem. When I run it on my development (Win 10) machine, it works fine. As it also has to run on Windows XP, I installed Windows XP in VMWare and tried to run it, but it crashes. It's been compiled with the latest Visual Studio toolset for Windows XP, so this is not the problem. There's not much info about the crash on the machine.
How do I debug it remotely? I'll probably need to attach it to Visual Studio 2015s debugger, but if there's another solution, I won't be against it.
You can install Visual Studio Remote Debugger on a machine that has problems and connect to it from your Visual Studio. After that you will be able to debug a remote process from your PC.
The latest remote debugger support Windows 7 and newer, so you might end up installing older version from VS 2013 or 2010 that would support Windows XP.

Visual Studio Remote Compile and Run

I am trying to figure out if it is possible to use Visual Studio 2012 as a full linux development suite. I know this is not the regular question here but work with me. What i have so far is the ability to use Visual Studio as a text editor to edit inside a virtual machine of Linux running on my computer.
The way that I have done this is to set up a permanent ssh portal that acts as as a hard drive in my windows. I have done this using a program called WebDrive:
So that is cool, it means I have the ability to fully view my Linux c++ project from Visual Studio. This provides all of the cool c++ editing things that i like about visual studio.
So where to from here?
Basically what I have now is a heavy glorified text editor.
What I would like to do is get the whole 'shabam' working.
I would like to be able to compile and run code from visual studio remotely on a server address. Is it possible? The code is built with cmake and g++ compiler?
Your best bet would be http://www.wingdb.com/. WinGDB allows working within VS studio and compiling on a remote Linux machine directly. Full step through debugging within VS is supported. For DLLs you can attach to remote process running on your Linux build server within VS. Great solution for working within the kinder VS dev environment but still having the full power of the Linux dev stack. Auto-generation of makefiles via VS project files too. Hope this helps.