Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » How to run/debug c++ project in eclipse on remote linux server from windows?
How to run/debug c++ project in eclipse on remote linux server from windows? [message #663120] Sun, 03 April 2011 14:53 Go to next message
Eclipse UserFriend
I have a project that I want to run and debug on my linux server.
The linux server is linux 2.6.18 and it has no GUI.
The operating system I am running on my computer is windows xp.
What are my options so that I will be able to run/debug the project on the linux server using the eclipse GUI?
tnx in advance.
Re: How to run/debug c++ project in eclipse on remote linux server from windows? [message #663136 is a reply to message #663120] Sun, 03 April 2011 20:36 Go to previous messageGo to next message
Eclipse UserFriend
You should be able to do it like this:

On the linux server, run 'gdbserver :<port> <yourProgram>, while on Windows Eclipse, choose the Remote Launcher Delegate. To do that, go to Debug Configurations... and create a new C/C++ Application. Then at the bottom of the dialog, there will be a hyperlink, click on it and change the setting to use "GDB (DSF) Remote System Process Launcher". Then fill in the project and binary, and in the debugger tab, make sure to put the IP of your Linux box along with the port you chose to run gdbserver. Eclipse will connect to your application and let you debug it.

Note that for the next Eclipse release, we have made this debugging solution easier to find by adding a "C/C++ Remote Application" configuration type. But it is not part of Helios.

Marc
Re: How to run/debug c++ project in eclipse on remote linux server from windows? [message #663185 is a reply to message #663136] Mon, 04 April 2011 05:22 Go to previous messageGo to next message
Eclipse UserFriend
tnx a lot,

which eclipse version should I use to do it?
Re: How to run/debug c++ project in eclipse on remote linux server from windows? [message #663257 is a reply to message #663185] Mon, 04 April 2011 09:32 Go to previous messageGo to next message
Eclipse UserFriend
You should use the latest released version: Helios. There was a new maintenance release not too long ago, so that would be the best quality one right now.

http://eclipse.org/downloads/


Re: How to run/debug c++ project in eclipse on remote linux server from windows? [message #663442 is a reply to message #663120] Tue, 05 April 2011 02:15 Go to previous messageGo to next message
Eclipse UserFriend
when I am trying to debug the eclipse give me the next error:
"'Launching Project' has encountered a problem
Error while launching command: gdb --version"

do you know what could be the problem?
Re: How to run/debug c++ project in eclipse on remote linux server from windows? [message #663504 is a reply to message #663442] Tue, 05 April 2011 08:25 Go to previous messageGo to next message
Eclipse UserFriend
founf this problem...I installed gdb on my windows and now I have other problem.
It says:
not in executable format: file format not recognized.

any ideas?
thanx
Re: How to run/debug c++ project in eclipse on remote linux server from windows? [message #663521 is a reply to message #663504] Tue, 05 April 2011 09:42 Go to previous messageGo to next message
Eclipse UserFriend
Try getting local debugging working on Windows. That will help get the remote debugging to work.

Try a C/C++ Application debug session with a Hello World program and see if that works on your Windows machine.

Marc
Re: How to run/debug c++ project in eclipse on remote linux server from windows? [message #664644 is a reply to message #663120] Mon, 11 April 2011 09:54 Go to previous message
Eclipse UserFriend
You'll need need to compile a cross version of gdb. I'd use MinGW and MSYS, then pass this to configure: "--target=i686-linux-gnu --host=i686-pc-mingw32 " (assuming your server is i686).
Previous Topic:"-static" linking option by default.
Next Topic:howto catch DebugEvent.SUSPEND with new DSF-GDB interface
Goto Forum:
  


Current Time: Wed Oct 15 15:37:56 EDT 2025

Powered by FUDForum. Page generated in 0.04803 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top