Xcode 4外部构建项目和调试 [英] Xcode 4 external build project and debugging

查看:70
本文介绍了Xcode 4外部构建项目和调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经建立了一个基于makefile的项目,该项目可以在多个平台上构建我的代码.在我的Mac上,我想使用Xcode进行调试.我已经将Xcode设置为外部构建项目,可以从Xcode中运行该应用程序.输出以Xcode显示,如果应用程序崩溃,它会进入调试器,但是在运行调试器时无法找到源文件,因此我只看到程序集输出.如何告诉Xcode在哪里找到源代码?

I've got a makefile based project set up that builds my code on multiple platforms. On my Mac I want to use Xcode for debugging though. I've set up an Xcode as an External Build Project I can run the application from within Xcode. The output is shown in Xcode and if the app crashes it drops in to the debugger, but when running the debugger cannot locate the source files, so I just see assembly output. How can I tell Xcode where to locate the source?

我也不能设置断点,但是我认为这都是相同的问题.

I also cannot set breakpoints, but I think that this is all the same problem.

推荐答案

我能够通过为可执行文件设置自定义工作目录来解决不在断点处停止的问题.在进行此更改之前,我能够使用Xcode 4的外部scons系统成功构建.从XCode调用时,我的代码将运行,但是断点将被忽略.

I was able to fix the issue of not stopping at breakpoints by setting a custom working directory for the executable. Before this change I was able to build successfully using the external scons system from Xcode 4. My code would run when called from XCode but breakpoints would be ignored.

然后在XCode中,转到产品->编辑方案...检查使用自定义工作目录"并将其设置为与可执行文件相同的目录.

Then in XCode, Go to Product -> Edit Scheme... CHeck 'use custom working directory' and I set this to the same directory as the executable.

断点然后开始工作.

这篇关于Xcode 4外部构建项目和调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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