Debugging C++ Code

gdb
cplusplus

#1

Hello,

I’m working on learning C++ and have found Cloud9 as a great online IDE. I’m running into an issue getting the debugger to work for c++ code, however. I’ve worked through the run/debug help page and tried to search the forums and the internet but haven’t found a topic that helps me out.

Basically my issue is that I follow the instructions to turn on the the debugger and nothing happens, set breakpoints and still nothing happens. I noticed in the run window once you choose “Runner: c++ (simple)” the little debug icon disappears.

Does Cloud9 debug c++ code? If so how do I get it to do so?

Thanks much.


#2

We do have a GDB debugger implementation that could work for you with some adjustments:


#3

Hi there,

I also would like to use GDB with the Cloud9 Ide for c++.

Runner looks straightforward, but how do i get that debugger implementation in my workspace?


#4

It just works out of the box after installing gdbserver:

to install gdbserver on your cloud9 workspace

sudo su
apt-get install gdbserver

after that just use the runner


#5

If you are unable to debug after a single run.

kill -9 `pgrep gdb`


#6

is not working - runs the app but doesn’t stop on the breakpoints


#7

This does not work for Raspberry Pi 3 running Jessie and c9 SDK and gdbserver is already installed.


#8

This is already installed on Jessie build.
The lack of response to this very common issue with many posts is most disconcerting.
I’ve tried many things, even totally reinstalling c9sdk, uninstalled - reinstalled gdb & gdbserver - no improvement - exactly the same and on 2 builds!
I’ve tried C++ (simple), C (GDB Debugger).

I have a Beaglebone Black which c9 works on perfectly and I’m trying to compare - looks like the gdbserver runs correctly but gdb does not fire up on the Raspberry.


#9

guys, how do you implement the debugger?


#10

are you looking to implement debugger for a new language?
debuggers are at https://github.com/c9/c9.ide.run.debug, some documentation can be found at
https://cloud9-sdk.readme.io/docs/debugger-plugin


#11

thanks, that helped a lot