[英]Code::Blocks Debugger : how to `step into` functions on line-by-line execution?
When debugging a C++ program on Code::Blocks 20.03
, I press SHIFT+F7
to step into
the program, then I begin pressing F7
to go to the next line
and watch
variables changing in "real time".在Code::Blocks 20.03
上调试 C++ 程序时,我按SHIFT+F7
step into
程序,然后开始按F7
转到next line
并watch
变量“实时”变化。
But Code::Blocks 20.03's debugger won't enter any functions beside main
, making it pretty useless, or forcing me to not use any function besides main
(a bad programming practice).但是 Code::Blocks 20.03 的调试器不会输入除main
之外的任何函数,这使得它非常无用,或者迫使我不使用除main
之外的任何函数(一种不好的编程习惯)。
How can I make Code::Blocks 20.03's debugger enter the functions too?如何让 Code::Blocks 20.03 的调试器也进入函数?
breakpoint
(red circle) exactly on the line the function main
is defined;在定义函数main
的行上设置breakpoint
(红色圆圈);F8
(the same as clicking Debug->Start/Continue
), which would make the program just run until the last line and exit (only flashing on the screen before disappearing), press Shift+F7
(the same as clicking Debug->Step Into
), in order to make the debugger enter the function and not just run it completely and return its result;不要按F8
(与单击Debug->Start/Continue
相同),这会使程序运行到最后一行并退出(仅在屏幕上闪烁,然后消失),而是按Shift+F7
(与单击Debug->Step Into
相同) Debug->Step Into
),为了让调试器进入函数而不是完全运行它并返回它的结果;F7
(the same as clicking Debug->Next line
) to keep watching the program run "step-by-step";按F7
(与点击Debug->Next line
相同)继续观察程序“一步一步”运行;Reference: ImageCraft - CodeBlocks Debugger Functions .参考: ImageCraft - CodeBlocks 调试器函数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.