The CDT plugin is installed in Eclipse, and the C + + code is written, run is normal, and today debug appears as Error
Baidu know, did not install GDB Debugging tools, then installed. Here's how:
1. Need to install a homebrew,homebrew is a package manager. Homebrew website Address: http://brew.sh/index_zh-cn.html
Homebrew Installation method: Open Terminal window, paste the following script
<span style= "White-space:pre" ></span>ruby-e "$ (Curl-fssl https://raw.githubusercontent.com/Homebrew/ Install/master/install) "
Wait for installation to complete
2. Install GDB and paste the following script in the terminal window
<span style= "White-space:pre" ></span>brew install HTTPS://RAW.GITHUB.COM/HOMEBREW/HOMEBREW-DUPES/MASTER/GDB.RB
3. After installing GDB, make the signing certificate, reference article: http://www.cnblogs.com/yinxiangpei/articles/3897701.html
3.1 Open keychain Access, create a certificate
3.2 Enter a name and select the type
3.3 Enter the validity period, the general default of 365 is good, that is, a year
3.4 then continue straight on until you create the screen, select the system, and create
3.5 Select the Gdb-cert certificate that you just generated, and double-click
3.6 in the certificate introduction, open Trust, and use this certificate when you choose to always trust
3.7. Signing the GDB
Restart your computer, open the shell, and then execute the following code:
Codesign-s Gdb-cert/usr/local/bin/gdb
GDB can debug go after completing the above work, but will prompt for the administrator password each time it is used.
3.8 Enables ordinary users to also use GDB
Since the previously produced certificate is under the system, each execution of GDB will prompt the administrator password, the solution is also very simple, open keychain access to the system below the Gdb-cert copy to the log on the line.
3.9 After installing GDB, check that the GDB installation is successful---> in the terminal window, enter: Gdb-version
4. Set the GDB path in eclipse
5. At this point, you are ready to debug C + + programs.
If the previous program has been set to Debug configurations, you need to reset
Mac/C + + Debug method in Eclipse