如何仅使用快捷键在调试或发布模式下切换正在运行的 Xcode 项目? [英] How to toggle running Xcode project in debug or release mode by using only shortcut keys?

查看:28
本文介绍了如何仅使用快捷键在调试或发布模式下切换正在运行的 Xcode 项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认情况下,要在发布模式下运行"我的项目,我需要编辑方案的运行设置以使用发布"而不是调试.

By default, to "run" my project in release mode, I need to edit the scheme's run settings to use "release" instead of debug.

为了不必每次在调试和发布模式之间切换时都编辑方案,我创建了一个在发布中运行的新方案.但是这样还是比较繁琐,因为要切换需要点击相关方案.

To not have to edit the scheme each time I want to switch between debug and release mode, I created a new scheme which runs in release. But this is still tedious since I need to click on the relevant scheme if I want to switch.

有没有一种方法可以仅使用快捷键在调试/发布模式下自动(构建 + 运行)?

Is there a way that I can automatically (build + run) in debug / release mode using only short cut keys ?

我不想配置文件!因为那会发射仪器等

I don't wan't to profile! Because that launches instruments etc.

要清楚 - 我总是在设备上运行.

To be clear - I'm always running on the device.

推荐答案

Debugging build: "Product" Menu => "Build For" => "Running" (shift-command-R)

Debugging build: "Product" Menu => "Build For" => "Running" (shift-command-R)

发布版本:产品"菜单 =>构建目的"=>分析"(shift-command-I)

Release build: "Product" Menu => "Build For" => "Profiling" (shift-command-I)

无需构建即可运行(无论您刚刚构建的哪个):产品"菜单 =>执行操作"=>无需构建即可运行"(control-command-R)

Run without building (whichever you just built): "Product" menu => "Perform Action" => "Run without building" (control-command-R)

这篇关于如何仅使用快捷键在调试或发布模式下切换正在运行的 Xcode 项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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