GDB断点在CS50 IDE中混乱 [英] GDB breakpoints confusion in CS50 IDE

查看:128
本文介绍了GDB断点在CS50 IDE中混乱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在第33行创建一个断点。当我运行时,代码会经过第33行。





谢谢,



我的尝试:



[ ^ ]

I am trying to make a breakpoint at line 33. WHen I run, the code runs through past line 33, however.


THanks,

What I have tried:

[^]

推荐答案

可能因为高度永远不会等于1.但是,我们不可能知道。我们无法运行您的代码而且我们没有您的代码所需的数据。



再次!调试器会告诉你你的代码在做什么。在它上面的if右侧设置断点并检查变量中的值是解决这个问题的唯一方法。
Probably because height is never equal to 1. But, it's impossible for us to know. We can't run your code and we don't have the data your code needs.

AGAIN!! The debugger would have told you what your code is doing. Setting the breakpoint on the if right above it and inspecting the values in the variables is the ONLY way you're going to solve this.


这篇关于GDB断点在CS50 IDE中混乱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆