Netbeans“解决缺少的调试器命令” C ++ [英] Netbeans "Resolve missing debugger command" C++

查看:142
本文介绍了Netbeans“解决缺少的调试器命令” C ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我尝试调试任何程序(即欢迎消息)时,都会收到此提示。关于如何运行C ++程序调试器的任何想法吗?

Whenever I try to debug any program (i.e. a welcome message), I get this prompt. Any ideas how to run the debugger for C++ program?


我正在使用Macbook Pro OS X El Capitan (10.11.3)

I am using Macbook Pro OS X El Capitan (10.11.3)

推荐答案

对于Mac OSX 10.5及更高版本,

For Mac OSX 10.5 and above,


  1. 安装Homebrew(如果尚未安装)

  1. Install Homebrew (if you don't have it already)

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"


  • 安装GDB

  • Install GDB

    brew install gdb
    


  • 转到 https://sourceware.org/gdb/wiki/BuildingOnDarwin ,然后按照说明对gdb二进制文件进行代码签名。

  • Go to https://sourceware.org/gdb/wiki/BuildingOnDarwin and follow the instructions to code sign the gdb binary.

    如果重新在Sierra上,在终端中运行以下命令

    If you're on Sierra, run the following command in your terminal

    echo "set startup-with-shell off" >> ~/.gdbinit
    


  • 最后,在终端中运行以下命令

  • Finally, run the following comamnd in your terminal

    which gdb
    


  • 将该命令的输出路径(我的是/ usr / local / bin / gdb)复制到Netbeans的调试器命令框中,然后开始调试!

  • 这篇关于Netbeans“解决缺少的调试器命令” C ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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