调试从命令行构建的iOS应用程序 [英] Debugging iOS app built from commandline

查看:86
本文介绍了调试从命令行构建的iOS应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过命令行构建一个iOS应用程序,但我在调试问题时遇到问题。如果我使用XCode构建,它将让我在设备上构建和调试没有问题。但现在,我不知道如何在使用gdb的设备上启动它,并逐步完成。如果我尝试添加自定义目标/可执行文件到一个空白的XCode项目,然后启动它,XCode抱怨找不到可执行文件。如果我手动在设备上安装该应用程序并尝试使用XCode中的gdb附加它,则会发生同样的情况。关于如何调试这个程序的任何指针?更改构建过程以使用XCode不是一个选项。

解决方案

本网站提供了一个很好的教程,介绍如何在iOS设备上手动设置远程调试会话。该过程归结为在设备上创建远程调试服务器,并使用本地GDB实例附加到该服务器。


I am building an app for iOS via commandline but I am having problems debugging it. Had I built using XCode, it would have let me "build and debug" on device without problems. But now, I don't know how to launch it on device using gdb and step through it. If I try to "add a custom target/executable" to a blank XCode project and then launch it, XCode complains about not finding the executable. Same thing happens if I install the app on device manually and try to attach to it using gdb within XCode. Any pointers on how to go about debugging this app? Changing the build process to use XCode is not an option.

解决方案

This site gives a nice tutorial on how to manually set up a remote debugging session on an iOS device. The process boils down to creating a remote debugging server on the device and attaching to it with a local GDB instance.

这篇关于调试从命令行构建的iOS应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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