Add a way to find debug and console in XCode debug

Source: Internet
Author: User

Every time after the completion of the code is compiled and run to see whether the results of the program run to meet our expectations, at this time, we can not leave the console to us to output the necessary information, for this reason,

When the program is running, our console plays itself out, is it good? Is it better to have the console auto-hide when we end debugging and need to continue coding? So, let's set it up as follows:

1: Automatically display the console when the compilation is up and running

2: Automatically hide the console when the running state is ended:

Two. View

Crash:

In the process of development, it is always unavoidable to produce Crashthat you cannot anticipate. In fact, after having the ARC , the chances ofCrash are relatively small, but occasionally it is necessary to come so many times. The most feared, like the following, Generates Crash, but stays in the main.m code:

Such Crash hints are not of any help to us, of course, experienced developers will check the console automatically output Crash information, as follows:

By exception and reason to locate the main source of the crash produced.

But in this case, we can only guess the error in which class, try to set a breakpoint on the code that might appear crash, step-by-step debugging to finally locate the line of code that really produces crash.

This efficiency is obviously very low, there is no way to quickly locate the wrong specific location?

Yes!

Find show the breakpoint Navigator in our Xcode, set a global exception breakpoint as in

When we run the program again and try to simulate the Crashthat was just generated, the result is thatXCode is positioned exactly where the Crash is generated. this is really great!

Add a way to find debug and console in XCode debug

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.