vacationpolew.blogg.se

Run visual studio code debugger with command line arguments
Run visual studio code debugger with command line arguments






run visual studio code debugger with command line arguments

On macOS Sierra, I used Homebrew to install gdb: local$ brew install gdb -with-all-targets

run visual studio code debugger with command line arguments

Since students are not allowed to install software via apt on the U of T machines, I used Linuxbrew to install it to my user folder: remote$ brew install gdbserver 2.

run visual studio code debugger with command line arguments

On Debian/Ubuntu, you can do: remote$ apt-get install gdbserver Note: Commands to be run on the remote machine are prefixed with remote$ and local commands are prefixed with local$. Note: I’m using macOS Sierra locally, with the remote machine running Ubuntu 14.04, but this guide should work with any Unix system. My goal was to be able to edit and debug locally in a familiar editor while compiling and running on the remote teaching lab machines. If you’re like me and prefer using a GUI to a command line for setting breakpoints, stepping through code, and inspecting values as your program runs, here is how you can set up VSCode and gdbserver to edit and debug your code locally while running it on a remote server.īackground: I’m working on an assignment for CSC469 at the University of Toronto, and it will only compile and run on the university’s teaching lab machines. Debugging C/C++ Programs Remotely Using Visual Studio Code and gdbserver








Run visual studio code debugger with command line arguments