逐行调试 [英] Specially debugging line by line
本文介绍了逐行调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
使用选项 -g
编译文件:
fpc / gpc -g file.pas
为此文件运行 gdb
gdb文件
设置所有必需的变量:
显示first_var
显示second_var
...
开始调试:
开始
按 s
可以继续下一行。
I have a script written in Pascal. I would to debug it in this way: stop at every line, dump values of all variables in memory and go to the next line. Is it possible to do it with gdb or some other open-source tool for Linux?
解决方案
Compile file with option -g
:
fpc/gpc -g file.pas
Run gdb
for this file:
gdb file
Set all of needed variables:
display first_var
display second_var
...
Start debugging:
start
By pressing s
you can continue to the next line.
这篇关于逐行调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文