Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Xcode 可以在调试时计算表达式的值吗?
我的意思是像 MS Visual Studio 一样,有一个“监视”窗口,调试器可以在其中输入由局部变量组成的表达式,vs 将计算该值。在xcode中也可以做类似的事情吗?如何?
使用运行/显示/表达式窗口。您还可以在控制台窗口(带有提示符的窗口)中使用print(或)命令。p(gdb)
print
p
(gdb)