I am new to debugging and I need to how to use the debugger in geany IDE. Is there any documentation or a video available in the internet related to the geany debugger? I have surfed everywhere but I couldn't find anything understandable. Can anyone help me out?


I have come across this problem myself.

Compiler: gcc, Debugger: gdb, Editor: geany

Assuming you have installed gcc and gdb by this.

Install gcc and gdb

sudo apt install gcc gdb

To install geany:

sudo apt install geany

To install the plugins for geany:

sudo apt install geany-plugins

Restart geany if open now.

To activate the debugger in geany: menu->tools->plugin manager , checkbox the debugger.

Change the build commands to include the -g flag:

menu->build->build commands

Set the compile command to:

gcc -g -Wall -c "%f"

Set the build command to:

gcc -g -Wall -o "%e" "%f"

And now you can set breakpoints in your code by clicking next to the line numbers. You will see a red square.

In the menu->view->show message window You will have a tab called debug.

Click the debug tab then click the target tab.

Choose your target(if you build "example.c" and set output to "example" which you would normally run with "./example" you would choose "example" as target.

On the right side of that window you can start the debugging.

| improve this answer | |
  • 2
    I've followed those instructions but I don't have any tab called "debug". – shahar_m Mar 6 '17 at 6:49
  • Greate explanation. Thanks alot. – EsmaeelE Feb 17 at 18:35

As stated in the documentation most the the controls offered by this plugin are pretty standards (Breakpoints, Watches).

However this page may help you to start using the debugger: http://geanydbg.sourceforge.net/walkthrough.htm.

| improve this answer | |
  • I have some experience in the Dev C++ debugger and I know how breakpoints and watches work but I can't understand what are environmental variable,Target and autos. I followed the procedure here http://geanydbg.sourceforge.net/walkthrough.htm but it didn’t work. – ganezdragon Apr 26 '14 at 11:37

OK I found something that works here in this forum but still the step into button is still a little buggy :P Will update when I get it correct.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.