简体   繁体   English

Xcode如何调试不在工作项目中的文件

[英]How can Xcode debug files not in the working project

I'm using Unreal Engine to build a game, most parts are done in Visual Studio in windows, except build the iPhone release. 我正在使用虚幻引擎来构建游戏,除了构建iPhone版本外,大部分都在Windows的Visual Studio中完成。

The Xcode project contains nothing but an Info.plist and the Game.app, which is build with external gcc & g++ commands. Xcode项目只包含Info.plist和Game.app,后者是使用外部gcc和g ++命令构建的。 I can choose "Run without Building" in XCode to run and debug on real device. 我可以在XCode中选择“无需构建即可运行”以在实际设备上运行和调试。

As a result of that project structure, I cannot easily navigate between file, the only thing I found for now is click "Pause" in debugging window, then use "Step In", "Step Over" and "Step Out". 由于该项目的结构,我无法轻松地在文件之间导航,我现在发现的唯一一件事是在调试窗口中单击“暂停”,然后使用“进入”,“跳过”和“退出”。 There for I'm limited to where the app paused and related code. 因为我仅限于应用程序暂停的位置和相关代码。

I can set break points by clicking on line numbers, but gdb break command does not work. 我可以通过单击行号来设置断点,但是gdb break命令不起作用。 So I can't find files from breakpoints. 所以我找不到断点的文件。

So that leads to my problem, how can I navigate in files that actually built the app when they are not in the solution? 因此,这导致了我的问题,当我不在解决方案中时,如何浏览实际构建应用程序的文件?

Thank you. 谢谢。

It turns out I can actually use break filename:linenumber to add a break point, program will break there, even if it does not work at Xcode's break point view. 事实证明,我实际上可以使用break filename:linenumber添加一个断点,即使它在Xcode的断点视图中不起作用,程序也会在那里中断。

I think it's also how everybody else debug there UDK games. 我认为这也是其他人在那里调试UDK游戏的方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM