Remote debugging(c++) with visual studio code - c++

I searched for how to open and edit file located on remote server via local visual studio code(IDE). But I also wanted to do remote debugging, which means I will control the gdb command(via GUI)from the IDE instead of terminal.
I checked this link, but it is for node.js.
Can someone help me with this.

I use GDB extension for Visual Studio to debug my applications on remote linux machine.
Check out : extension
For reference See: link
In case you are developing apps on linux you may want to see the Linux workload from visual studio installer.

Related

Remote Debugging with Microsoft Embedded Visual C++

I need to attach remote debugger to the process running on Telmet320 device. The executable for that device is build using Microsoft Embedded Visual C++ 4.0. I have a connected device, source of application and Embedded Visual Studio installed on my desktop. But I do not see a possiblity for the remote debuggin in Visual Studio itself. Also I did not find remote tool for Embeded Visual studio (Not sure if they are exist at all).
Any help will be very valuable.
Found a solution. In Embedded Visula C++ goto to Build -> Start Debug -> Attach to WCE Process ...

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

running visual studio release build .exe file in different machines

I have built a visual studio c++ console application(x64 release build). The .exe file in the release folder runs fine with the required dlls.
When i try to run it on other machine it throws error
The Application was unable to start correctly (0xc000007b). Click OK to close the application
There is no x86-x64 lib mismatch issues.
In another machine it works well.I don't know whether it needs any resource to run the .exe
I have tried building the application statically still no results..
1)It is possible the new machine is missing important software like .NET framework or something similar. Please install the other frameworks and then try to run it on other machine.
2)If new machine has other OS try to run program in compatibility mode
You need the same Visual Studio redistributable .dlls on your target machine.
You'll either need to install the redistributable or install visual studio on that machine.
Also note that it makes a difference whether you're using Express or not.
So you can't develop on Visual Studio 2008 Express and then install the Visual Studio 2008 Redistributable.

Windows User Mode Debugger Transport for Visual Studio 2012

I read a post about Visual Studio 2012 being able to support Windbg commands in the immediate window. This requires that one chooses the "Windows User Mode Debugger" option while choosing the Transport under "Attach to Process" option.
While this seems to work for the local host qualifier, I am interested in knowing if i can debug a remote target process using this method just like we do by selecting the remote transport.
I am using Visual Studio 2012 Premium.
I tried giving the IP of the machine in the qualifier section with the "Windows User Mode Debugger" transport selected but i got the "Could not connect to the machine" message.
I also tried the steps mentioned in this link:
http://msdn.microsoft.com/en-us/library/windows/hardware/hh439381(v=vs.85).aspx
but it did not work.
Also , i'm not sure if this article is meant for a different version of Visual Studio since the button that i see next to the Qualifier field is named "Find..." rather than "Browse" as the article mentions.
Can someone please help me with the right steps here?
Have you run dbgsrv.exe in the remote target machine.
Step#1:
Install Windows SDK in the remote target machine
Step#2:
Run command:
cd C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x86
dbgsrv.exe -t tcp:port=12346
Step#3:
As you said, refer to:
http://msdn.microsoft.com/en-us/library/windows/hardware/hh439381(v=vs.85).aspx
This doesn't seem to be documented and I struggled with this myself a year or so back, but the WinDbg integration is Visual Studio is for what's called the smart client way of debugging. You need to run dbgsrv.exe on the server and then you'll be able to connect.
See more information about dbgsrv.exe etc. here: Process Servers (User Mode) and especially here: Activating a Process Server.
I wasted hours on this.

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.