简体   繁体   中英

How to execute my C program line by line in geany as in turbo C

I have switched to Linux Mint from Windows 7 and now I am using Geany to write C programs in it.

As I mentioned in the question that I want to execute my program line by line in Geany. During execution is there a way where I can see the value of variables in Geany?.

I am using Geany because it's light weight and it has an integrated terminal, compiler, scribble, etc. which is very simple to use...

Install Geany Debugger Plugin and then you can easily execute your program line by line.

  1. Step 1:

    Install Optional Add Ons:

    • Graphical GDB Front end for geany
    • set of plugins for geany

      from Ubuntu Software centre or anything you have which do similar job

2.Step 2: Go to Main Menu > Tools > Plugin Manager

3.Step 3: Set Debugger to active by ticking the checkbox and then click OK

Now, you may see Debug option at the bottom of geany:
在此处输入图片说明

4.Step 4: Now, I think rest of the debugging is easy - just select the file and load it in the debugger and there you'll have all the options including breakpoints and executing line by line.


Note:
Don't forget that now you have got debug terminal, you can straight away use any of the gdb's (I am thinking you have GDB debugger) commmands. By the way, don't forget to check out the reference links for complete detail (especially the 2nd and 5th).



Reference:
1. http://plugins.geany.org/debugger.html
2. http://ubuntuforums.org/showthread.php?t=1400668
3. http://betterexplained.com/articles/debugging-with-gdb/
4. Line by line c - c++ code debugging in Linux ubuntu
5. http://www.yolinux.com/TUTORIALS/GDB-Commands.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM