Reputation: 3688
As mentioned in the title, I am using NetBeans IDE 7.0.1 for C++ (for the assignments at the university). I was using gedit and terminal, but I would like to try my hand at IDEs.
I tried Eclipse but I seem to prefer Netbeans interface.
(All the above->with my laptop, running Ubuntu 11.10).
Well, I have some questions,
Also, at debug mode, when I get a segmentation fault I get a new window saying "Signal Caught" and then this:
Signal received: SIGSEGV (?) with sigcode ? (?)
From process: ?
For program testing_netbeans, pid 15,211
You may discard the signal or forward it and you may continue or pause the process
To control which signals are caught or ignored use Debug->Dbx Configure
with three options available ("Discard and Pause", "Discard and Continue", "Forward and Continue"). What do each of the above options do?
How is it possible to get the line where the error occurs? (in example with gdb I would compile with -g3 option and then run with gdb. But now how can I do that by default?
What I did like about eclipse is the fact that it would have a default breakpoint at the 1st line of the main function, is there any way to do that by default?
Thank you for your time!
Upvotes: 7
Views: 2377
Reputation: 138
The compiler flag is -ggdb. It allows you to use breakpoints, know the values of variables and etc.
If you are just building in "debug mode", you will get minimal information, such as line of crash by opening the "call stack" page.
Eclipse is a bit better for debugging, but as an editor, I much prefer Netbeans over it for C++, while I prefer Eclipse for Java
EDIT: Also, you have to have setupped GDB as the debugger in Netbeans, but I'm pretty that's done by default.
Upvotes: 1