简体   繁体   English

如何像在turbo C中一样在geany中逐行执行我的C程序

[英]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. 我已经从Windows 7切换到Linux Mint,现在我正在使用Geany在其中编写C程序。

As I mentioned in the question that I want to execute my program line by line in Geany. 正如我在问题中提到的,我想在Geany中逐行执行程序。 During execution is there a way where I can see the value of variables in Geany?. 在执行过程中,有一种方法可以查看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... 我使用Geany的原因是它的重量轻,并且具有集成的终端,编译器,涂鸦等,使用起来非常简单...

Install Geany Debugger Plugin and then you can easily execute your program line by line. 安装Geany Debugger插件 ,然后可以轻松地逐行执行程序。

  1. Step 1: 第1步:

    Install Optional Add Ons: 安装可选的附加组件:

    • Graphical GDB Front end for geany Geany图形GDB前端
    • set of plugins for geany geany插件集

      from Ubuntu Software centre or anything you have which do similar job 从Ubuntu软件中心或您从事类似工作的任何东西

2.Step 2: Go to Main Menu > Tools > Plugin Manager 2.第2步:转到Main Menu > Tools > Plugin Manager

3.Step 3: Set Debugger to active by ticking the checkbox and then click OK 第3步:通过选中复选框将调试器设置为活动状态,然后单击确定

Now, you may see Debug option at the bottom of geany: 现在,您可能会在geany的底部看到Debug选项:
在此处输入图片说明

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. 4.Step 4:现在,我认为其余的调试很容易-只需选择文件并将其加载到调试器中,您将拥有所有选项,包括断点和逐行执行。


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. 不要忘记,现在您有了调试终端,您可以立即使用任何gdb(我认为您有GDB调试器)命令。 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 1. http://plugins.geany.org/debugger.html
2. http://ubuntuforums.org/showthread.php?t=1400668 2. http://ubuntuforums.org/showthread.php?t=1400668
3. http://betterexplained.com/articles/debugging-with-gdb/ 3. http://betterexplained.com/articles/debugging-with-gdb/
4. Line by line c - c++ code debugging in Linux ubuntu 4. 逐行c-在Linux ubuntu中调试c ++代码
5. http://www.yolinux.com/TUTORIALS/GDB-Commands.html 5. http://www.yolinux.com/TUTORIALS/GDB-Commands.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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