ashmish2
ashmish2

Reputation: 2967

How to debug remote program running on linux from windows

I am used to visual studio debugger(its really good) and I have to debug a program running on linux(in C++) from my windows machine. Can anyone suggest how to debug remote program running on linux from windows

Upvotes: 1

Views: 1540

Answers (2)

Blank
Blank

Reputation: 7208

For console based programs, you're going to want to look into gbd. It's a command line utility, but with a bit of knowhow, it's every bit as capable as Visual Studio for tracking down a problem. You could start your program over a remote SSH session and debug it this way. This might even work for GUI based applications that you were viewing over a VNC connection.

Upvotes: 0

Erik
Erik

Reputation: 91260

  • Install an X-Windows server on your windows machine, there are quite a few alternatives (e.g. cygwin/X).
  • SSH to the linux machine with X forwarding enabled, or setup your X server to accept connections from your linux machine and manually setup the DISPLAY on the linux machine.
  • Install and run e.g. ddd on the linux machine - it'll display on your windows machine
  • debug

Upvotes: 2

Related Questions