A plugin to debug C++ Application remotely The gdb is running on remote system using ssh protocol It is only required to have gdb installed in the remote server. (The gdbsever is not required by this plugin). The debugger invokes the program in the remote system and starts debugging it. The source code files in the eclipse project can be a copy of the remote source code which is used to build the program. In this case an automatic mapping between the local and remote source code happens so you can set breakpoints in Eclipse project as you do in normal debugging. Eclipse and the debugged program can be on different platforms . For example you can debug from Eclipse running on Windows a program which runs on Linux system. To use it,: Open "Debug Configurations", select "C/C++ Remote Application", right click and click "New". From the bottom of the page click "Select other..", click "Use configuration specific settings", then select ""Direct Remote Debugging Launcher" from launchers list. Enter your remote settings and start debugging Note: "Remote workspace directory" field points to the location of the source code copy on the remote machine. While you select any field in the Main tab you can click Help icon (in bottom right), then click on "Launching Remote C/C++ Applications Directly" to get help about the pluging including the settings fields All standard C++ debugging features in Eclipse are supported ( the plugin is based on DSF framework).
Additional Details
Eclipse Versions: 2021-03 (4.19), 2020-12 (4.18), 2020-09 (4.17), 2020-06 (4.16), 2020-03 (4.15), 2019-12 (4.14), 2019-09 (4.13), 2019-06 (4.12), 2019-03 (4.11), 2018-12 (4.10), 2018-09 (4.9), Photon (4.8), Oxygen (4.7), Neon (4.6), Mars (4.5), Luna (4.4)
Platform Support: Windows, Mac, Linux/GTK
Organization Name: mabdelazim@gmail.com
Development Status: Mature
Date Created: Saturday, June 6, 2015 - 16:03
License: GPL
Date Updated: Monday, December 5, 2022 - 22:31
Submitted by: Mohamed Abdelazim
Date | Ranking | Installs | Clickthroughs |
---|---|---|---|
October 2024 | 186/598 | 47 | 1 |
September 2024 | 196/642 | 102 | 13 |
August 2024 | 219/641 | 69 | 11 |
July 2024 | 208/663 | 81 | 10 |
June 2024 | 225/681 | 77 | 12 |
May 2024 | 197/682 | 108 | 13 |
April 2024 | 202/687 | 112 | 7 |
March 2024 | 226/694 | 97 | 3 |
February 2024 | 199/687 | 109 | 9 |
January 2024 | 195/691 | 121 | 9 |
December 2023 | 195/671 | 115 | 7 |
November 2023 | 182/686 | 153 | 12 |
Unsuccessful Installs
Unsuccessful Installs in the last 7 Days: 3
Count | Error Message |
---|---|
3 | Cannot continue the operation. There is another install operation in progress. |
Reviews Add new review
Launching stuck at start
Submitted by Ainars Zvaigznitis on Mon, 05/23/2022 - 08:38
Eclipse 2022-03 (4.23.0) for windows - looks like the same problem as described below in 'Stuck in "Starting program"'. Launching (gdb at Linux) just stuck at "Starting program" - in my case at 20%, the same error message and nothing in console at all.
Re: Launching stuck at start
Submitted by Mohamed Abdelazim on Mon, 12/05/2022 - 22:34
In reply to Launching stuck at start by Ainars Zvaigznitis
Hi Ainaros,
I haven' tested 4.23.0. The last one I tested was 4.19..0. If you still have the problem, would you please try the plugin on 4.19.0
debugging frozen
Submitted by Jamie Mising name on Wed, 04/13/2022 - 08:21
I am running "Eclipse IDE for C/C++ Developers (includes Incubating components) Version: 2022-03 (4.23.0) Build id: 20220310-1457" locally on a Mac,
and debugging c & C++ executables running in a Linux machine, running "GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7".
I installed "Direct Remote C++ Debugging 1.2.0.0" on my Eclipse and finished the setup.
The very begining of the debug worked well, But then after a while, the 'Variable's view showed errors on some variables, then all variables are empty now.
Even worse, now it is stuck in a step, none of 'Step Over', 'Step Into' or 'Resume' could move a step!
I could not even terminate the debugging. Seems Eclipse doesn't recognize any instruction from me.
What could I do? Any help is appreciated!
Re: debugging frozen
Submitted by Mohamed Abdelazim on Mon, 12/05/2022 - 22:36
In reply to debugging frozen by Jamie Mising name
Hi Jamie,
I haven't tried the plugin on 4.23. I tested it on 4.19. If you still have the problem, Do you mind testing it o 4.19?
Hi,
Submitted by Jamie Mising name on Tue, 04/12/2022 - 16:34
Hi,
I am running "Eclipse IDE for C/C++ Developers (includes Incubating components) Version: 2022-03 (4.23.0) Build id: 20220310-1457" locally on a Mac, and debugging c & C++ executables running in a Linux machine, running "GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7". I installed "Direct Remote C++ Debugging 1.2.0.0" on my Eclipse and finished the setup.
The very begining of the debug worked well, But then after a while, the 'Variable's view showed errors on some variables, then all variables are empty now. Even worse, now it is stuck in a step, none of 'Step Over', 'Step Into' or 'Resume' could move a step! What could I do? Any help is appreciated!
Thank you in advance,
Jamie
Stuck in "Starting program"
Submitted by Shadi I on Tue, 04/07/2020 - 08:26
launching the debug configuration gets stuck at "starting program" (45%).
It gets stuck like this forever. Then if I try to abort I get the error: "Could not start gdb on the remote host by ssh. See console output for more details"
note: the console has no output at all. Even when I redirect to a local file.
passing arguements
Submitted by Shadi I on Tue, 04/07/2020 - 07:44
How can I pass arguements to the application being debugged? (the arguments tab in the normal debug configurations)
how can I change SSH ports
Submitted by Shadi I on Tue, 04/07/2020 - 06:22
I am trying to debug within local vm/container. So I need to change the ssh ports.. is this possible?
Re: how can I change SSH ports
Submitted by Shadi I on Tue, 04/07/2020 - 08:28
In reply to how can I change SSH ports by Shadi I
I managed to do so from the Remite system explorer modifybg the properties of the connection.
Re: Re: how can I change SSH ports
Submitted by Mohamed Abdelazim on Mon, 12/05/2022 - 22:37
In reply to Re: how can I change SSH ports by Shadi I
Thanks Shadi for sharing with us your issue and the solution.
Problem starting debug session
Submitted by Tony M on Wed, 02/13/2019 - 15:02
Hello, I am trying to debug a program on a remote Linux server from my Windows laptop using your plugin. I set up a remote debug configuration, but when I try to start debugging, it asks me for SSH credentials, and then gives me this error: Error creating Terminal Do you have any idea what it means and where to get more information? I am not sure if I specified all the parameters for my debug configuration correctly - is there a tutorial on how to use your plugin? Any help would be greatly appreciated -- thank you!
Re: Problem starting debug session
Submitted by Mohamed Abdelazim on Tue, 07/30/2019 - 15:14
In reply to Problem starting debug session by Tony M
Which Eclipse versoin you are using?
Away from the pluing, try to create a terminal for this connection inside Eclipse and see if it works.
No, there is no tutorial for the plugin. The plugin is quit simple, the steps in the "Details" section here should be enough.
Problem with Setting remote system type in release 1.2.0.0
Submitted by ALAN O'KEEFE on Sat, 08/18/2018 - 23:19
I have installed version 1.2.0.0 in Eclipse Neon.
When I try and create a new Connection after selecting "Direct Remote Debugging Launcher", it pops up a dialogue box to "Select remote system type", but the list is empty? Am I supposed to setup the system types somewhere else in eclipse?
Regards
Re: Problem with Setting remote system type in release 1.2.0.0
Submitted by Mohamed Abdelazim on Mon, 08/20/2018 - 10:13
In reply to Problem with Setting remote system type in release 1.2.0.0 by ALAN O'KEEFE
You need to setup "Remote System Explorer" plugin.
You can do that from "Hep" -> "Install New Software....."
Re:Problem with Setting remote system type in release 1.2.0.0
Submitted by Mohamed Abdelazim on Mon, 08/27/2018 - 07:41
In reply to Re: Problem with Setting remote system type in release 1.2.0.0 by Mohamed Abdelazim
I have just fixed the problem by adding "Remote System Explore" dependency in the plugin.
Re: Problem with Setting remote system type in release 1.2.0.0
Submitted by ALAN O'KEEFE on Mon, 08/20/2018 - 17:50
In reply to Problem with Setting remote system type in release 1.2.0.0 by ALAN O'KEEFE
Sorry, that was Eclipse Photon, not Neon
Version 1.2 is available now
Submitted by Mohamed Abdelazim on Sat, 08/18/2018 - 20:26
The version 1.2 is avaible now. It includes a fix for "Error with command: gdb --version Cannot run program 'gdb': Launching failed" problem and many others problem as well.
SSH Ports
Submitted by Jack Heaff on Thu, 06/21/2018 - 08:45
Hi,
I am running Eclipse Neon on Linux and my target is a centos virtual box. I am using vagrant to contact the virtual box.
What SSH ports or GDBServer ports does your plugin use? I will have to set up port forwarding in my vagrant config file to allow this to work.
Thanks!
jheaff
Re: SSH Ports
Submitted by Jack Heaff on Fri, 06/22/2018 - 08:28
In reply to SSH Ports by Jack Heaff
So I now have the remote debugging plugin working perfectly! It seems that if any of the "prerun commands" in the debug configuration contained commands that printed to stdout, like "pushd or popd", then the plugin seemed to fail. By piping stdout to >/dev/null it now works!
Unable to run gdb
Submitted by kikouk kikouk on Wed, 05/09/2018 - 04:49
I got the following error :
Error with command: gdb --version Cannot run program "gdb": Launching failed
It seems I'm not the only one : (see stackoverflow.com/questions/42143458/debugging-in-eclipse-with-remote-gdb). It is exactly the same behavior.
Re: Unable to run gdb
Submitted by Mohamed Abdelazim on Sat, 08/18/2018 - 20:27
In reply to Unable to run gdb by kikouk kikouk
Please try 1.2 version now, it should fix your problem.
Could not start gdb on the remote host by ssh
Submitted by Gael Alassoeur on Wed, 02/07/2018 - 07:51
Hi,
I think that I missed something in the configuration.
I have a Linux dev server with Eclipse and a solaris 10 Sparc target.
Workspace/ eclipse project and sources are shared via NFS
When I launch debugging, the process get stalled on "Starting Program".
On the server side, I see a new sshd process launched.
When I stop, I got the error "Could not start gdb on the remote host by ssh. See console output for more details"
In the debugger tab, the GDB debugger refers to one defined on the Solaris server.
Is there someone who had this pb ?
Thank you very much
Regards
Gael
Re: Could not start gdb on the remote host by ssh
Submitted by Mohamed Abdelazim on Tue, 04/10/2018 - 08:07
In reply to Could not start gdb on the remote host by ssh by Gael Alassoeur
What do you mean by "When I stop, I got error" did you stop for debugging for you stopped the sshd process ont eh server?
Your setup sounds correct.
Is the sshd process still running after it said "Could not start gdb on rmeote host"
Re: Could not start gdb on the remote host by ssh
Submitted by Mohamed Abdelazim on Sat, 08/18/2018 - 20:28
In reply to Could not start gdb on the remote host by ssh by Gael Alassoeur
Please the new version 1.2. It could fix your problem
I have the same problem as
Submitted by Erik Montnemery on Thu, 09/01/2016 - 15:09
I have the same problem as reported by Mohammad Abdo
I'm also running Windows 10 on my local PC with Eclipse Neon (4.6.0) and trying to connect to a linux machine over ssh.
The ssh connection itself is succesful, but launch of the debug configuration gets stuck with no error or debug messages.
Re: I have the same problem as
Submitted by Mohamed Abdelazim on Sat, 08/18/2018 - 20:29
In reply to I have the same problem as by Erik Montnemery
Please try the new version 1.2. It could fix your problem
Getting the fallowing error
Submitted by Julian Hindelang on Tue, 08/09/2016 - 11:23
Getting the fallowing error message while drag the download on this page into eclipse:
Unable to read repository at http : //mabdelazim.github.io/DirectRemoteDebug/RemotDebugUpdateSite_1_1/content.xml.
org.apache.http.client.ClientProtocolException
Download it by search
Submitted by Mohamed Abdelazim on Wed, 08/10/2016 - 12:28
In reply to Getting the fallowing error by Julian Hindelang
It sounds there is a problem in drag and drop.
Please search for "Direct remote debug" in eclipse market from eclipse, The plugin will appear first result. You can install it from this.
Different Issue
Submitted by Mohammad Abdo on Sun, 07/03/2016 - 10:43
Hi, I have a completely different issue:
I am running windows 10 on my local (laptop) with Eclipse mars (4.5.2), where as my server runs linux with gdb 7.5.1
This GDB was configured as "x86_64-unknown-linux-gnu".
I have tried to perform the process and it did not give me any errors but when it starts launching it takes forever at 24% and nothing happens after that.
Same problem
Submitted by Erik Montnemery on Thu, 09/01/2016 - 15:09
In reply to Different Issue by Mohammad Abdo
I have the same problem,
I'm also running Windows 10 on my local PC with Eclipse Neon (4.6.0) and trying to connect to a linux machine over ssh.
The ssh connection itself is succesful, but launch of the debug configuration gets stuck with no error or debug messages.
Re: Same problem
Submitted by Mohamed Abdelazim on Sat, 08/18/2018 - 20:30
In reply to Same problem by Erik Montnemery
Please the try new version 1.2. It could fix your problem
Re: Different Issue
Submitted by Mohamed Abdelazim on Sat, 08/18/2018 - 20:30
In reply to Different Issue by Mohammad Abdo
Please try the new version 1.2. It could fix your problem
New version of neon
Submitted by Mohamed Abdelazim on Fri, 04/29/2016 - 19:54
Hi All
The version 1.1 has been published for Eclipse Neon version.
The problems similar to /dev/ttyp0 are solved now.
Please give me feedback about any new problems.
bugs?
Submitted by bryan fok on Wed, 03/16/2016 - 04:21
I get "/dev/pts/23: Permission denied." error.
I got some idea what is
Submitted by bryan fok on Sun, 03/20/2016 - 22:42
In reply to bugs? by bryan fok
I got some idea what is happening now. Each time the plugin hit the debug it try to connect to a dev/pts for input/output. But the plugin didn't get the one belong to my account (there are different users using the debug server aswell), therefore, it return a "permission denied" error. I have observed, each time the plugin try increment 1 on the /dev/pts, e.g. /dev/pts/14, /dev/pts/15, /dev/pts/16, etc.
Solution suggestion?
Re: I got some idea what is
Submitted by Mohamed Abdelazim on Wed, 03/23/2016 - 00:14
In reply to I got some idea what is by bryan fok
Does a normal ssh program likes putty works fine with same account ? If yes, I guess the problem in the ssh options which the plugin used. One suggestion is build a separate program which does only ssh connect with same as the plug-in and try to figure out where is the problem.
The new version 1.1 for
Submitted by Mohamed Abdelazim on Fri, 04/29/2016 - 19:55
In reply to I got some idea what is by bryan fok
The new version 1.1 for Eclipse Neon fixes this.
Source code is now available
Submitted by Mohamed Abdelazim on Mon, 12/28/2015 - 15:51
Hi All
The source code is now published in public.
You can find it in this URL
https://github.com/mabdelazim/DirectRemoteDebug/tree/master/src/org.ecl…
pids of the server process in gdb 7.2 and loading core files
Submitted by Asif khan R on Tue, 12/22/2015 - 06:17
Just what i had been searching for more than a year. The existing remote debugging with gdb-server and gdb was not very easy to use, as we already had to do lot of cross compilations on linux and configurations on windows eclipse.
I used this and tried to attach a debugged to a running process of linux, it listed all my windows processes, i figured that it was because my version of gdb does not support listing the threads and process, so i had to write a hack to change the "listtasks.exe" to actually do a connect to the linux machine and get all the processes. Thought i will check with you and see if we can have an easy way.
Additionally, i have been trying to load a core file using the windows gdb to load a core. This means that i need to have a target gdb on my machine and it was not easy. Can we adapt this project to also work for loading core file. I would actually like to contribute. You could probably guide me how to start contributing and let me know ur email id.
Unable to debug remote application
Submitted by Bharath Narayan M G on Fri, 12/18/2015 - 04:35
Hey there,
I got the following error when I tried to debug a remote application.
/dev/pts/5: No such file or directory.
My gdb version is 7.2
gdb --version
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-75.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
www.gnu.org/software/gdb/bugs/.
Anyone else seeing this? Solution?
Cheers!
Bharath
Gdb version 7.10 problem
Submitted by Mohamed Abdelazim on Mon, 11/02/2015 - 06:41
HI
Thanks for the information.
It sounds the plugin has problem with version 7.10 now. This version is not tested yet.
Please send me your contact email so we can add a support for it.
As as a temporary workaround you can install gdb version 7.2 on the server and make it the default gdb
Thanks a lot for sharing this with us.
Best Regards
Mohamed Abdelazim
Could not get it to work successfully
Submitted by Pranav Ladkat on Thu, 10/22/2015 - 18:18
I couldn't get it to work. I set up the debug launcher as you mentioned in the description. I did run the debugger but I'm getting the error:
/dev/ttyp0: No such file or directory.
I'm not sure how to solve this issue. It'll be great if you could give more information about the error and any ways to solve this will be greatly appreciated.
Thanks
Please make sure the ssh
Submitted by Mohamed Abdelazim on Tue, 10/27/2015 - 07:31
In reply to Could not get it to work successfully by Pranav Ladkat
Please make sure the ssh server is running on your server and gdb is installed.
You can check this by connect by ssh to the sever from command line or from putty and run gdb manually .
Please send me the OS you run Eclipse on it, the server OS and the gdb version.
Please also send the whole console output when you run the debugger.
mac on local, ubuntu on remote, same gdb version
Submitted by Pranav Ladkat on Wed, 10/28/2015 - 18:45
In reply to Please make sure the ssh by Mohamed Abdelazim
I do have a running ssh with the server, I'm using eclipse's synchronized C++ project to sync between local and remote through ssh. The remote and local machine has same version of gdb but the OS is different. I have mac on local machine and ubuntu on remote. Following is the console output I get when launched debugger through this plug-in:
###############################
GNU gdb (GDB) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word".
/dev/ttyp2: No such file or directory.
###############################
Version 7.10 problem
Submitted by Mohamed Abdelazim on Wed, 11/04/2015 - 01:37
In reply to mac on local, ubuntu on remote, same gdb version by Pranav Ladkat
Please find my last post as a reply to you.
The new version 1.1 for
Submitted by Mohamed Abdelazim on Fri, 04/29/2016 - 19:56
In reply to Version 7.10 problem by Mohamed Abdelazim
The new version 1.1 for Eclipse Neon fixes this.
I got the same error. I use
Submitted by Nghia Nguyen on Wed, 11/18/2015 - 06:27
In reply to mac on local, ubuntu on remote, same gdb version by Pranav Ladkat
I got the same error. I use Mac OS 10.10 as host machine and Ubuntu 14.04 64 bit as remote machine.
As gdb cannot find
/dev/ttyp2
on the remote machine, I create a link to/dev/tty1
as a temporary solution:e.g.,
sudo ln /dev/tty1 /dev/ttyp2
PS. You may want start from 0:
sudo ln /dev/tty1 /dev/ttyp0
Hope this can help!
Thanks for this help
Submitted by Mohamed Abdelazim on Mon, 11/23/2015 - 03:05
In reply to I got the same error. I use by Nghia Nguyen
It sounds the gdb in the plugin looks for the /dev/tyyp2 always for some reason. Your workaround sounds good. I will try to figure out why it wants /dev/ttyp2.