ios developer tiny share-20160720

今天分享使用Xcode Debug,包括打开调试面板、设断点、使用LLDB、管理断点等。

具体内容如下:

Debug your app
Use the Xcode debugger to inspect your code while running your app. The debug navigator and debug area automatically appear when you build and run your app. If necessary, show the navigator area by clicking the left button () and the debug area by clicking the middle button () on the right of the toolbar.
To set a breakpoint in your code, open the file in the source editor and click in the gutter next to the line of code you want to break in. To temporarily disable a breakpoint, click the breakpoint badge in the gutter and it turns grey. To temporarily disable all breakpoints, click the breakpoint icon in the debug bar. To delete a breakpoint, drag it out of the gutter. Run your app and the debugger will stop the app at the breakpoint you specified when that line of code is executed.


The debug bar appears at the top of the debug area and contains the buttons to control the execution of your app—for example, continue, step over, and step in to. The variable area below shows the variables in the current scope. To view a variable, click the disclosure triangle next to a variable. If the value is an image, you can quick look it directly in Xcode. The console area to the right shows standard output and is where you enter LLDB debugger commands. For example, enter “po [expression]” and the debugger will execute the expression you enter. As you type an expression, the debugger offers suggestions for completing it similar to the source editor. The debug navigator appears to the left of the debug area and allows you to navigate the stack.


To manage your breakpoints, click the breakpoint navigator () in the navigator area. You can view, disable, and delete breakpoints. To add special types of breakpoints, click the Add button (+) at the bottom of the navigator and choose a type of breakpoint from the pop-up menu. Control-click a breakpoint to display a contextual menu and explore more ways to manage your breakpoints.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值