Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netbeans "Resolve missing debugger command" 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?

enter image description here I am using Macbook Pro OS X El Capitan (10.11.3)

like image 347
Lieft1951 Avatar asked Feb 19 '16 04:02

Lieft1951


3 Answers

On Linux systems derived from debian, you have to install gdb

sudo apt-get install gdb

Then in debbuger command type

/usr/bin/gdb

More information of gdb can be found in GDB: The GNU Project Debugger

like image 50
freddycra Avatar answered Nov 19 '22 12:11

freddycra


For Mac OSX 10.5 and above,

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

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

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

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

    echo "set startup-with-shell off" >> ~/.gdbinit
    
  5. Finally, run the following comamnd in your terminal

    which gdb
    
  6. Copy the output path from that command, (mine was /usr/local/bin/gdb) into the Debugger Command box in Netbeans and start debugging!
like image 5
Adam Prax Avatar answered Nov 19 '22 13:11

Adam Prax


Make sure gdb is installed in your machine. you can do this by following C:\cygwin64>setup-x86_64.exe -q -P gdb

after this, select gdb as a debugger in netbeans gdb location

like image 1
Vibhor Avatar answered Nov 19 '22 13:11

Vibhor