Netbeans not able to debug - c++

I use Netbeans 8.0 on Ubuntu 14.04 and I have run into a problem with debugging c++ files. In the past this has worked. According to what I see on Google, if I go to the project properties I should see
General
Build....
Run
Debug
Related Projects
In my case there is no debug entry, which explains why I can't debug. I went to the repository and removed and reinstalled gdb. Then I removed Netbeans and reinstalled it as well. In case there was something wrong with my project, I made a new c++ project and it too was missing the debug capability.
Anybody have any idea what else I can do? This has to be something fairly basic but I can't guess what else I can do.
Thanks,
Ilan

I got a similar results with NetBeans 8.02 on Ubuntu 12.04.
Some projects are unable to be run with debugger. Some can be debugged.
The same project, complied on Ubuntu 12.04 but with NetBeans 8.0 (without updates) runs with debugger with no problems.
So it seems to be a version issue of NetBeans.

Related

MacOS Catalina 10.15.5 - OMNeT++ 5.6.2 stucks at "Configuring GDB"

I have a problem in debugging OMNeT++ in my Macbook Pro.
I installed OMNeT++ 5.6.2 on my MBP having macOS Catalina 10.15.5 and tried to run tictoc tutorial. It runs fine, however there is a problem with debugging.
I know that masOS no longer supports gdb and we have to install gdb through Homebrew or Macports and then configure it. I already have set up gdb.
In order to test gdb, I installed eclipse CDT, set up and configure GDB, then started debugging.
It was debugging fine in eclipse. However, when I debug in OMNeT++, it stucks at "Configuring GDB".
I also tried with OMNeT++ 5.5.1 but having the same problem.
I also asked it before at stack overflow, but couldn't find appropriate solution.
MyPreviousQuestion
Does anyone know how to fix OMNeT++ debugging issue on macOS?
Just like in the other SO question: I would also advise to try to use OMNeT++ 6.0 preview 8 on macOS. I have successfully built it on macOS 10.15 and as suggested in the other SO thread, it does use lldb instead of gdb.
An alternate workaround could be to use VS Code with an appropriate extension. I have just published a blog entry related to debugging OMNeT++ models:
https://omnetpp.org/blog/2020/07/05/omnetpp-debugging-tips.html

Error starting process. Cannot create pty - Eclipse on Mac

I am trying to run a simple C++ program on Eclipse in mac. But it is not working. I have Xcode installed and I did try setting all the Eclipse settings that people suggested online, but still I am getting no where.
The error message:
Make sure you update to the Oxygen.1 version of the C/C++ IDE (CDT version 9.2.2). It contains a fix for this.
If you are using Eclipse Neon, update to CDT version 9.3.X by adding repo:
http://download.eclipse.org/tools/cdt/releases/9.3
and rebuild the project before running it.
I encounter the same problem when I updated my macOS 10.12 to 10.13 in Eclipse Oxygen.1A.
By upgrading the CDT plugin I solved the problem.

Mountain Lion no working gdb debugger

I got a new Macbook Air and installed XCode 5 on it. To my surprise Apple does no longer ship gdb with the command line tools. As I am doing lots of c++ coding I am dependent on a good debugger.
What I tried so far:
Install gdb 7.6 via macports and signed the binary.
Debugging from QT-Creator is possible. It stops at the breakpoints but I see no information at all about the stack. Using lldb not possible, I get a weird python error.
Debugging from Netbeans is not possible at all. The Debugger is not stopping at any breakpoint. Apart from that Netbeans is not working with lldb.
Working with XCode is no problem. Everything works as expected.
Problem is I need an IDE that can do remote debugging as I have several Raspberry Pi projects. Developing software directly on the pi with vim is fun but not suitable for bigger projects.
So the question is, has anyone a working debugger on Mountain Lion with XCode 5 installed? IDE in question needs to support remote debugging (eg QT-Creator, Netbeans, Eclipse)
Thank you!
Install Xcode 4.6.3. If you have a developer's account it's available for download at http://developer.apple.com
Encountered the same problem. Finally installed command line tools from xcode 4.6.1 on ML. This package is available on Apple site. It installed GCC-LLVM 4.2.1 and GDB 6.5. Qt Creator was able to build application and start debugging. Debugging is not stable too much; but i can to see call stacks, values and stop on breakpoints. I use it for 32bits build - maybe it matters.
You could also switch from GDB to using the LLDB debugger (although the Qt support is early for this).
See http://stanford.edu/~rawatson/lair/mac.html

Using Eclipse CDT under Windows with Cygwin

I am trying to use Eclipse CDT with Cygwin, but I have problems with the debugger. I have done the following:
- installed Eclipse CDT
- installed Cygwin with gcc, g++ make and gdb
- added c:\cygwin\bin to PATH
- created a new Hello World application in Eclipse
Compiling went well from Eclipse. The first problem was that I had to set the executable manually in the run configuration. Having done this, I running also worked. But when I try to debug, I get the following error:
When I switch to debug perspective, I can see the following:
I tried different debug configurations, but I always get the same result.
First, make sure gdb is located on c:\cygwin\bin. I believe executing which gdb on cygwin might help you do that.
Now, instead of adding this information to PATH and making it available to all your Windows applications, try adding it to your project settings inside Eclipse, like this guy did:
http://www.benjaminarai.com/benjamin_arai/index.php?display=/eclipsecygwingcc.php

Eclipse Ganymede and MinGW in Windows

I'm trying to get eclipse to work with MinGW.
I've done the following:
Downloaded CDT for eclipse.
Installed MinGW.
Added C:\MinGW\bin to my path.
Opening a command prompt (CMD) and typing g++ or alike works fine.
I run eclipse, create a "New C++ Project", and only get the option saying "other toolchains".
There's a MILLION tutorials out there saying eclipse should identify MinGW on its own. It doesn't, and I don't know what to do. I've tried reinstalling everying in just about every order posible. Still no luck.
I've also noted some tutorials say something about creating a "Managed C++ Project". I've no such option, all I get is "C++ Project" and "C Project"
edit:
I have eclipse ganymede, windows x86_64, version 3.4.2
http://download.eclipse.org/eclipse/downloads/drops/R-3.4.2-200902111700/index.php
Running the "Eclipse IDE for C/C++ developers" fails, since there's no x64 version for windows. The x86 version requires x86 JAVA installed as well, and installing two versions of java, gave nothing but trouble in the past.
The instructions for setting up MinGW in Ganymede are located here.
The following are instructions and
links on how to install the current
version of MinGW. Note that these
links may become inaccurate over time
as new versions of MinGW components
are introduced. Please check the MinGW
File Release section for the latest
versions.
Download and run the MinGW setup program, MinGW-5.1.3.exe.
Select download and install the MinGW base tools and the g++ compiler.
You may select the Current or
Candidate version of these tools. You
may also install any of the other
available compilers as well.
Do not install the MinGW Make feature as the MSYS version of make
from step 5 is a more complete
implementation of make.
The MinGW setup program currently does not install the gdb
debugger. To install the debugger,
download the file from the following
location: gdb-6.6.tar.bz2
Extract the contents of the file gdb-6.6.tar.bz2 to the same location
where you installed MinGW.
If you want to use Makefile projects, download and run the setup
program from the following location:
MSYS-1.0.10.exe. MSYS provides an
implementation of make and related
command line tools. This is not
required for other types of projects
with the MinGW toolchain, which use
CDT's internal build tools to perform
the build.
Following this process resolved any problems I had.
I had the same exact problem with Eclipse Galileo and CDT 6.0.1. It turns out that CDT only recognized MinGW when it's located under c:\mingw. I had it in c:\msys\mingw so that was the problem. After I changed that everything worked fine.
The distinction between managed make projects and makefile project was removed in CDT 4.x, I think. Now there is only one type of project, but you can select different builders. CDT includes an internal builder which does not use makefiles and another one which does.
First, save yourself the effort of "reinstalling in every order possible". That is also known as trial-and-error, and will only make you more frustrated. Apply the normal problem-solving skills you have as a programmer.
Given that you have MinGW installed, what happens if you download "Eclipse IDE for C/C++ developers", start eclipse.exe, and try to create a C++-project with a MinGW toolchain?
EDIT: remember: the key in getting help with problems like these is to produce a minimal example which fails. Also, it would help if you provided URLs to the packages you installed (MinGW, Eclipse, etc.).
EDIT: I just installed CDT using the Ganymede update site, downloaded and installed MinGW from here, and restarted Eclipse, and everything worked fine. I know that doesn't help you, but it does prove that the toolchain detection isn't completely broken. Something is weird on your side.
You could try Wascana Desktop Developer. Its a distribution of Eclipse CDT configured specifically for developing on Windows.
I had the same problem (i.e. Eclipse not finding MinGW on the PATH) after I removed some of the unused files/folders from MinGW. It was ~600 MB and I was tasked to trim it down before adding to source control. I got it down to a workable ~200 MB. When I tried to re-create an Eclipse workspace afterwards, MinGW disappeared from available toolchains. It reappeared after I put the original MinGW install on the path.
HTH