Mawg
Mawg

Reputation: 40205

Netbeans 7.01 with Cygwin, debugger won't stop on breakpoints

I presume that the debugger is configured correctly (but what else can it be)?

If I look at Tools/Options/C/C++ it is set up nicely for Cygwin_4.x and the toolset programs all exist (especially C:\cygwin\bin\gdb.exe) Since I can build and link ok, and this all gets setup by NetBeans discovery of the toolset, I would expect to be able to debug.

The only minor detail is that C:\users\mawg.gdbinit does not exist. I supplied an empty file to no avail. IIRC from form running GDB by hand 20 years ago it isn't necessary.

If I Ctrl+F5 (debug main project (I have only one)) or Alt+F6 (run all test files) the application runs and produces output ... I can also "step into" and proceed with F7 & F8 ...

... but it won't stop on breakpoints.

I guess that I am missing something very simple. Who can point it out to me, please? Thanks

Upvotes: 1

Views: 777

Answers (1)

Mawg
Mawg

Reputation: 40205

OK, I could just delete this question, but I will post the "answer" just so others might have one more thing to check if they have the same problem.

Not being able to debug with Netbans, I tried MS visual studio and it reported that I had an opening

#ifdef  __cplusplus
extern "C" {
#endif

without the corresponding close.

This is not a NetBeans problem; it is a GCC compiler problem, from GCC of Cygwin, I will report this to GNU/GCC.

Moral: migh be worth checking; but it is always worth running problematic code through a few different compilers and linters.

Upvotes: 1

Related Questions