Netbeans for NS-3 ignores breakpoints when debugging - c++

I'm using netbeans IDE to write a ns-3 program. I have configured it correctly and running works perfectly. The problem arises when I want to debug. Every breakpoint added to an ns-3 library works ok, but when I add a breakpoint to my own file, the execution doesn't stop and just ignores the breakpoint.
I've tried to change some debug configurations and to locate breakpoints at different lines of the file and none of them is working.
I'm using netbeans 12.6 in ubuntu 20.04 LTS and the ns-3 version is 3.0 using the MmWave module.
Thanks for all!

Related

Debugging any C++ with Netbeans/gdb terminates immediately with a SIGSEGV?

My Os is : MacOS High Sierra 10.13.5
NetBeans Version : 8.2
Gdb Version: 8.0.1
I can use NetBeans build and run NetBeans Sample C++ Application successfully
but when I try to Use NetBeans to Debug NetBeans Sample C++ Application Quote with gdb, I always get an Error like below, and it always run into the osstream file, I am confused!
I set BreakPoint at main function like below
I don't change any configuration, It is NetBeans Default Configuration for sample C++ project Quote.
Anyone Can help me, how can I fix this error?

CLion Debug not working on Mac

I haven't used CLion in a bit and something is amiss - when I try to debug, breakpoints are not hit. I see the checkmark flash briefly but the program continues to run. Here is a 15 second video showing what happens:
https://youtu.be/txn6W6aSWnM
This project is the vanilla Hello World project with a couple of lines of code added to the main program, and a breakpoint added in the middle.
This is a new Mac - is something misconfigured? Or has something broken in CLion?
Note: This is still happening with 2018.1. I've reported to JetBrains and sent various logs, etc., but still no ability to debug.
I'm using a Mac with the latest version of OSX (10.13.4 as of writing), and also using CLion 2018.1.2. I had this same issue.
The fix was straight forward. Simply go to Tools > CMake > Reset Cache and Reload Project.
ensure the Configuration is the same as the pictureenter image description here
Simply go to Tools > CMake > Reset Cache and Reload Project.
For anyone who ends up here, I was running Clion 2018.1.2 on MacOSX Catalina and had all kinds of problems (specifying GDB vs. LLDB, reseting cache, rebuilding project, etc... nothing worked). I upgraded to Clion 2020.2.1 and debugged the identical project I was having problems with and BAM; breakpoints, variables, stepping into, etc... all worked.

Visual Studio 2015/Linux extension 1.0.7: breakpoints are ignored

I am writing a small Linux app using Visual Studio 2015. To do so, I am using the Visual Studio 2015 Linux Extension, v 1.0.7 (the latest version as I'm writing this post).
I can compile and run the app on the remote environment using gdbserver, but I can't use breakpoints. I don't get why.
Details:
The target environment is a remote Ubuntu 64, on which g++, gdb and gdbserver have been upgraded today.
The extension works in that sense the C++ code is properly sent to the remote environment and properly compiled as a result of pressing F7:
My code (I am using some toy code for this post)
The resulting build log
The code is also properly executed remotely using gdbserver when I'm running it: the output is properly sent back by gdbserver as I can view it in VS's Linux Console Window.
My problem: when I set a breakpoint in my code (as in line 7 of my code above), it is just ignored. And when I just press F11 to start debugging straight at startup, the program just runs as if I wasn't debugging.
I'm wondering whether this is tied to the debugging from host 127.0.0.1 message above.
Of course I'm in debug mode when trying:
Optimizations are disabled:
Symbols are there:
And debug settings are by default. I left them unchanged after having installed the extension. There are no ports set, could it be the cause?
And finally, I can do some step-by step debugging if I replace gdbserver by gdb in my debug configuration above, and if I use F10 (or any other stepping option), not F5, to start debugging. The drawbacks being that I lose the Linux Console and I still can't set breakpoints, they are ignored. I have to step during the whole execution path:
This is the first time I am trying this Linux Extension with a remote environement. I was formerly using it with a local Cygwin and had no issues with breakpoints. But this was the previous version (1.05) of the Visual Studio 2015 Linux Extension so this does not prove anything.
Any idea?

Unable to run SDL program in Eclipse but able to do so in Windows Explorer

I have installed and set up SDL and managed to get a tutorial example to build (the tutorial code is from http://zamma.co.uk/setup-sdl2-eclipse-windows/) as a C++ Project in Eclipse.
The problem is that when I try to run the application from Eclipse, the window doesn't appear, or perhaps it gets closed soon after appearing. Eclipse doesn't appear to show any errors.
When I open the folder containing the executable in Windows Explorer and double-click on the application, it works; a window appears with "Hello World" as the title and closes after two seconds.
How can I get the window to appear when I run from Eclipse? Any breakpoints I set are ignored by the debugger.
IDE: Eclipse Luna 4.4.1 OS: Windows 7 64-bit
The program now runs in Eclipse, so the solution may have been to refresh Eclipse and double check Build settings and Run configurations, as well as checking for any OS modifications that may affect the software running on it (thanks to all who replied for the help).

Debugging a C++ program in Intellij IDEA

I have been successfully run a C/C++ program in Intellij IDEA. But how to debug it? The operation system is Ubuntu 12.04 and Intellij IDEA version is 13.0.3. The path of the gdb is set to /usr/bin/gdb.
The settings in the Run/Debug configurations are also set to its own path.
The problem occurs when start Debugging, nothing happens in the IDE. How to fix it?