user2593271
user2593271

Reputation: 51

Netbeans debugger not working (GDB has unexpectedly stopped with return 1)

Everytime I try to debug my project with netbeans it doesn't let me do so. It gives the following error:-

"GDB has unexpectedly stopped with return 1"

And when I choose 'ok' it just stops everything. My project runs without any errors when I try to do so in netbeans. I want to step into my code and not being able to do so. Can somebody help me out with this? Thanks.

Upvotes: 5

Views: 6855

Answers (3)

George Rodionov
George Rodionov

Reputation: 1

I faced with not working GDB on Netbeans 8.2 with this message Debugger Error: Error

And I find the next solution:

  1. Firstrly lets get version gdb. In Tools->Open in terminal write

gdb -version

  1. I get version 13.2-1. And that the reason.

Cygwin 13.2-1

GNU gdb (GDB) (Cygwin 13.2-1) 13.2 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

  1. I found Netbeans work only with 9.2-1 and less GNU gdb (GDB) (Cygwin 9.2-1) 9.2
  2. Close Nenbeans.
  3. Get installer from official site. And reinstall gdb
  4. Reinstall.

Tune up cygwin gdb reinstall

  1. I tried on two machines two times and it's work.

Upvotes: 0

Gdb Init File was the problem for me.

Run > Set Project Configuration > Customize > Debug

It was pointing to ~/.gdbinit, I cleared that field, and it worked.

Must be something crazy I had in my .gdbinit, even though it works fine with raw gdb.

Netbeans 8.2.

Upvotes: 0

Richard
Richard

Reputation: 51

I had the same problem. I cleared my old debug breakpoints and this clear up the issues. I think the old breakpoints were pointing to dead code.

Upvotes: 5

Related Questions