Xcode Debugging commands and shortcut keys

Source: Internet
Author: User
Tags print object

Switch from Network

1. Po command:It is short for Print Object and displays the text description of the object (displays the string information obtained from the description message of the object ).

2. Print command:It is similar to formatting and output different object information.

3. info command:We can view the information of the memory address, such"Memory Address of info symbol"You can obtain information about the symbol where the memory address is located. For example"Info line * Memory Address"You can obtain the code line information of the memory address.

4. show command:Display information about GDB. For example, show version displays the gdb version.

5. HELP command:If you forget the syntax of a command, you can use the help command name to obtain help information. For example, help info shows the usage of the info command.

 

 

Basics
  • Control + command + arrow up/down switch current file header file and implementation file
  • Control + command + arrow left/right switch historical/next file
  • Command B/R compile/run
  • Command + Left click on word can be redirected in the Declaration/implementation of methods, definition of variables, and definition of Classes
  • Option + Left click on word quick help for the current content
  • Shift + command + y display debug Workspace
  • Command + F/option + command + F search/Replace (after the search, command + G can jump to the next result)
  • Shift + command + F is a global search, which is very convenient
  • (ESC) Automatic completion menu

PS. There are several common OSX system commands that are also very efficient.

  • Option + arrow left/right move the cursor in words
  • Command + arrow left/right move cursor to line header, end of line
Advanced
  • Shift + command + O quick file locating
  • Shift + command + J display the current file in the project navigation (this is especially useful in large projects. It is recommended !)
  • You can open a file in the option + Click project navigation in the secondary editor to view multiple source files at the same time. (the default secondary editor has poor functions, in this way, the split screen function of xcode3 can be retrieved)
  • Command + L is specified as the row to the file
  • Shift + command + l jump to the cursor position (of course, more often I prefer to click the down arrow to locate)
  • Control + I re-format the indent of the selected text
Debug
  1. Create a new tab (CMD + T) double-click the tab name and change it to console # You don't know how to change the name of the tab! This weak and explosive experience
  2. Adjust the console tab to your favorite debugging appearance. I like to have a big log window (SHIFT + cmd + C). The debug column is displayed on the left, and the right column is not displayed. Leave a space for the editor, this allows you to track resumable upload and display the final effect.
  3. You can disable the console tab (xcode will automatically remember the settings of this tab, so you should understand why you often have a log window during debugging, and sometimes you need to open it yourself)
  4. Enable the behavior option in settings.
  5. Select Run start and only selectshow tab CONSOLEAndshow navigator Debug
  6. Turn off all the options in run complete. # After debugging, we can continue to read the log, instead of closing the default log.
  7. Complete, run! If you have multiple screens, you can also drag the console tab and put it out to improve the effect!

 

Xcode Debugging commands and shortcut keys

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.