What is best way to do remote live gdb debugging and use Visual studio as the front end.
In my case: I have a C++ application (compiled for debugging) running on a Linux server
Thanks.
To start remote debugging, run GDB on the host machine, and specify as an executable file the program that is running in the remote machine. This tells GDB how to find your program's symbols and the contents of its pure text. Start GDB on the host, and connect to the target (see section Connecting to a remote target).
Select Configure remote debugging to configure the firewall and start the remote debugger. When configuration is complete, the Remote Debugger window appears. The remote debugger is now waiting for a connection. Use the server name and port number shown to set the remote connection configuration in Visual Studio.
GDB in VSCode SetupVSCode can be used as front end to GDB that provides a convenient environment to execute and debug your code directly in the editor. Note some level of VSCode familiarity is assumed in the following instructions. Add the following two JSON files to the . vscode directory.
You can easily do it with VisualGDB:
When you press "finish", the Wizard will create a Visual Studio wrapper project around your Linux project so that you can edit the files, built the project and debug it from Visual Studio.
There's a more detailed tutorial here: http://visualgdb.com/tutorials/linux/import/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With