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?
-
You mean this plugin? -> http://plugins.geany.org/debugger.html – Sylvain Pineau Apr 25 '14 at 14:36
-
yes. And that site doesn't have any clear documentation. – ganezdragon Apr 25 '14 at 14:41
3 Answers
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.
- 321
- 5
- 15
- 531
- 5
- 18
-
2I've followed those instructions but I don't have any tab called "debug". – shahar_m Mar 06 '17 at 06:49
-
-
I don't see debug option in plugin manager even after `geany-plugins` installation. – Abinash Dash Dec 23 '20 at 07:28
-
@AbinashDash OK, geany-debugger plugins is not exist in some distro like my debian 10. I compile it from source to use it. https://www.geany.org/download/releases/ – EsmaeelE Jan 22 '21 at 14:15
-
Hi if you right click on the messages tab it comes up with a list with it on. @shahar_m – Richard Bamford Jun 05 '23 at 20:53
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.
- 61,564
- 18
- 149
- 183
-
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](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.
- 274
- 1
- 3
- 13