简体   繁体   中英

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

  • Install an X-Windows server on your windows machine, there are quite a few alternatives (eg 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 eg ddd on the linux machine - it'll display on your windows machine
  • debug

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM