在使用SFML库的Xcode中调试期间不显示变量值

时间:2021-08-02 20:25:25

I installed SFML to make some simple 2D game. It seems that the debugging in Xcode has some issue. I load the template code, and add a line

我安装了SFML来制作一些简单的2D游戏。似乎Xcode中的调试存在一些问题。我加载模板代码,并添加一行

int a = 10;

Set the breakpoint at this line. But in the debug window, a has no value.

在此行设置断点。但是在调试窗口中,a没有任何价值。

在使用SFML库的Xcode中调试期间不显示变量值

The code without SFML looks ok. 在使用SFML库的Xcode中调试期间不显示变量值

没有SFML的代码看起来不错。

Is it related to LLDB?

它与LLDB有关吗?

  • Mac OS X 10.10
  • Mac OS X 10.10
  • Xcode 6.1.1
  • Xcode 6.1.1
  • SFML 2.2
  • SFML 2.2

Thanks!

谢谢!

1 个解决方案

#1


1  

This is linked to the build settings of your project. When creating a SFML project, some debug settings are not ideal apparently.

这与项目的构建设置相关联。在创建SFML项目时,某些调试设置显然并不理想。

There are three settings that need to be updated for the Debug settings (not Release):

调试设置(不是发布)需要更新三个设置:

  • Debug Information Format should be DWARF with dSYM File,
  • 调试信息格式应为DWARF和dSYM文件,
  • Strip Debug Symbols During Copy should be No, and
  • 复制期间的条带调试符号应为否,和
  • Optimization Level should be None.
  • 优化级别应为无。

You have to manually correct them as shown in this screenshot:

您必须手动更正它们,如此屏幕截图所示:

在使用SFML库的Xcode中调试期间不显示变量值

#1


1  

This is linked to the build settings of your project. When creating a SFML project, some debug settings are not ideal apparently.

这与项目的构建设置相关联。在创建SFML项目时,某些调试设置显然并不理想。

There are three settings that need to be updated for the Debug settings (not Release):

调试设置(不是发布)需要更新三个设置:

  • Debug Information Format should be DWARF with dSYM File,
  • 调试信息格式应为DWARF和dSYM文件,
  • Strip Debug Symbols During Copy should be No, and
  • 复制期间的条带调试符号应为否,和
  • Optimization Level should be None.
  • 优化级别应为无。

You have to manually correct them as shown in this screenshot:

您必须手动更正它们,如此屏幕截图所示:

在使用SFML库的Xcode中调试期间不显示变量值