简体   繁体   English

使用Xcode 6 .1在iOS8中符号崩溃

[英]Symbolicate crash in iOS8 with Xcode 6 .1

I used to symbolicate the crash report in Xcode 5.1.1 directly as there was "Symbolicate & Re-symbolicate" in Devices section of Organiser. 我曾经在Xcode 5.1.1中直接表示崩溃报告,因为Organizer的Devices部分中有“Symbolicate&Re-symbolicate”。 But after upgrading to Xcode 6.1, I could find neither symbolicate nor resymbolicate option to view the crash Log. 但升级到Xcode 6.1后,我既没有找到symbolicate也没有resymbolicate选项来查看崩溃日志。 I'm confused. 我糊涂了。 How to do it? 怎么做?

Previously I used to sync the device with iTunes and view the Crashes from ~/Library/Logs/CrashReporter/MobileDevice . 以前我曾经将设备与iTunes同步,并从~/Library/Logs/CrashReporter/MobileDevice查看崩溃。 Clicking on any crash would open up with Devices(Xcode) and then symbolicate. 单击任何崩溃将打开设备(Xcode),然后符号化。 But now, it opens up with Console and no option to symbolicate. 但现在,它打开了Console,没有符号选项。 Does Xcode 6.1 have any such option? Xcode 6.1有这样的选择吗?

Steps to symbolicate crash log manually in Xcode 6 在Xcode 6中手动符号化崩溃日志的步骤

  1. If you archived the release build before release, then go to STEP 2. Otherwise archive your final release build (without any code change). 如果在发布之前归档了发布版本,则转到步骤2.否则归档最终发布版本(不进行任何代码更改)。

  2. To locate your archive file, open organizer -> choose your project -> choose the latest archive file -> right click over it -> choose 'show in finder' 要找到您的存档文件,请打开管理器 - >选择您的项目 - >选择最新的存档文件 - >右键单击它 - >选择'show in finder'

  3. Right click on '*.xcarchive' file and select 'show package content' option then go to Products folder -> Applications Folder ->YourAppName.app (.app extension is hidden in some machine) 右键单击'* .xcarchive'文件并选择'show package content'选项然后转到Products文件夹 - > Applications Folder - > YourAppName.app (.app扩展名隐藏在某些机器中)

  4. Copy and paste your .app file in different location. 将.app文件复制并粘贴到其他位置。 Put the crash log file also in the same folder. 将崩溃日志文件也放在同一文件夹中。 Open terminal app and go to the folder which you pasted, through 'cd' command 打开终端应用程序并通过'cd'命令转到您粘贴的文件夹

  5. And type the following command in terminal with your crash address 并在终端中使用崩溃地址键入以下命令

xcrun atos -o YourAppName.app/YourAppName -arch armv7 -l 0xbd000 0x0013f745 xcrun atos -o YourAppName.app/YourAppName -arch armv7 -l 0xbd000 0x0013f745

Note: If the above command doesn't work, then change "armv7 to armv7s" and check. 注意:如果上述命令不起作用,则将“armv7”更改为“armv7s”并进行检查。

Eg: Crash log look like this, you need to get crash address and put it in the above command 例如:崩溃日志看起来像这样,你需要获取崩溃地址并将其放在上面的命令中

3   CoreGraphics                    0x266814d3 CGPathAddLineToPoint + 171
4   YourAppName                     0x00140a8b 0xbd000 + 539275
5   YourAppName                     0x0013f745 0xbd000 + 534341
6   Foundation                      0x27152d6b __NSThreadPerformPerform + 383
7   CoreFoundation                  0x2640a375 

A plugin is available for Xcode under the Product menu. 在“产品”菜单下,Xcode可以使用插件。 This plugin is available through Alcatraz package manager or can be directly downloaded from github . 这个插件可以通过Alcatraz包管理器获得 ,也可以直接从github下载。

This plugin internally incorporates a shell script that does the set up of running the following commands for manual crash symbolication. 此插件内部包含一个shell脚本,该脚本执行以下命令的设置,以执行手动崩溃符号化。

  1. Set an alias to symbolicatecrash.pl perl script 设置别名为symbolicatecrash.pl perl脚本

alias symbolicatecrash='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash' alias symbolicatecrash ='/ Applications / Xcode.app / Contents / Developer / Platforms / iPhoneOS.platform / Developer / Library / PrivateFrameworks / DTDeviceKit.framework / Versions / A / Resources / symbolicatecrash'

  1. To find symbolicatecrash, should it differ from the alias above: 要查找symbolicatecrash,它应该与上面的别名不同:

find /Applications/Xcode.app -name symbolicatecrash -type f find /Applications/Xcode.app -name symbolicatecrash -type f

  1. Set the DEVELOPER_DIR variable: 设置DEVELOPER_DIR变量:

export DEVELOPER_DIR='/Applications/Xcode.app/Contents/Developer' export DEVELOPER_DIR ='/ Applications / Xcode.app / Contents / Developer'

  1. With the dSYM the crash can be symbolicates as: 使用dSYM,崩溃可以象征为:

symbolicatecrash /path/to/MyApp_2012-10-01_Device.crash /path/to/MyApp.app.dSYM. symbolicatecrash /path/to/MyApp_2012-10-01_Device.crash /path/to/MyApp.app.dSYM。

Simply connect an iOS device, open Devices > The Device > View Device Logs, then drag and drop the crash to the list of crash files for the that device. 只需连接iOS设备,打开设备>设备>查看设备日志,然后将崩溃拖放到该设备的崩溃文件列表中。 The crash will be added to the list and will be symbolicated as long as the original archive exist. 崩溃将被添加到列表中,只要原始存档存在,它就会被符号化。

Connect the iOS device, open Devices (shift command 2), select the device and click 'View Device Logs'. 连接iOS设备,打开设备(shift命令2),选择设备并单击“查看设备日志”。 On the left side bar, the crash logs will appear. 在左侧栏中,将显示崩溃日志。 Select the one you're interested in. 选择您感兴趣的那个。

As long as you have archived the build that was running on the device at the time of the crash, the crash log will be symbolicated automatically after a few seconds. 只要您在崩溃时归档了在设备上运行的构建,就会在几秒钟后自动对崩溃日志进行符号化。 If not, right click the crash log and select 're-symbolicate log'. 如果没有,请右键单击崩溃日志并选择“重新符号化日志”。

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

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