你如何在 xcode 上快速调试断点? [英] How do you debug on breakpoints in swift on xcode?

查看:32
本文介绍了你如何在 xcode 上快速调试断点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 swift 的 xcode 中使用 po/p 命令时遇到了麻烦.它并不总是有效,并且大部分时间都会出错.此外,它的响应在大多数情况下是没有用的.例如,当我输入po user"时,它给出的不是我在使用objective-c时可以扩展的详细信息和项目

I face trouble using po/p command in xcode using swift. It doesn't work always and gives error most of the time. Also its response is not useful most of the time. For example, when i type "po user" it gives instead of its details and items which i could expand while using objective-c

你如何调试断点?是否有任何出色的外部工具或替代方案可用于此?

How do you debug any breakpoint? Are there any great external tools or alternatives available for this?

推荐答案

po 命令也可以在 swift 中工作

po command works in swift too

po yourvariable.description
po yourvariable.debugDescription

po print(yourvariable)

这篇关于你如何在 xcode 上快速调试断点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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