Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » C++ Debug on Windows with MinGW is a total bust: no stop at breakpoints, no console output
C++ Debug on Windows with MinGW is a total bust: no stop at breakpoints, no console output [message #1753906] Sun, 12 February 2017 05:46 Go to next message
Mike Spreitzer is currently offline Mike SpreitzerFriend
Messages: 1
Registered: February 2017
Junior Member
I have done a fresh installation of Eclipse Neon.2's Cpp (C/C++) IDE on Windows 10 with MinGW. I made a new HelloWorld C++ project, using all the default settings. It builds for debug and for release with no apparent problems. I can use gdb directly to debug the binary that Eclipse built for debug, and it works as expected. I can use Eclipse to run the binary built for release and it runs as expected --- it produces the expected output in the Console.

But when I try to use Eclipse to debug I get nothing. I set a breakpoint on the line that does the output, but it does not stop there. I have left the setting to break at entry to main turned on, but no break on entry to main happens. No output happens. It is almost as if the program does not even get run --- but I see some output in the Debugger Console that suggests something happened. I added a second line that does output and set the breakpoint there. Still no output and no stop.

I do _not_ have the "skip all breakpoints" button set. I have repeatedly cleaned all and rebuilt. I have repeatedly deleted all breakpoints and then set the one (if any) that I want. I have tried with no breakpoint set; still I get no output when I debug. I have tried launching the debug several different ways; all produce the same result. I think the attached snapshot was taken after I launched by selecting the binary built for debug, right-clicking to bring up the context menu, then picking "Debug As > Local C/C++ Application".

The attachments show

the whole eclipse window with the Debugger Console visible:
index.php/fa/28415/0/

the Console showing that the program terminated with no output:
index.php/fa/28416/0/

the debug configuration showing the Main tab:
index.php/fa/28417/0/

and the debug configuration showing the Debugger tab:
index.php/fa/28418/0/

Here is what I find in the "CDT Global Build Console":

00:28:10 **** Incremental Build of configuration Release for project hw2 ****
Info: Internal Builder is used for build
g++ -O3 -Wall -c -fmessage-length=0 -o "src\\hw2.o" "..\\src\\hw2.cpp"
g++ -o hw2.exe "src\\hw2.o"

00:28:11 Build Finished (took 542ms)

Info: Nothing to build for hw2
Info: Nothing to build for hw2

Re: C++ Debug on Windows with MinGW is a total bust: no stop at breakpoints, no console output [message #1755778 is a reply to message #1753906] Wed, 08 March 2017 05:31 Go to previous message
Ken Turner is currently offline Ken TurnerFriend
Messages: 1
Registered: March 2017
Junior Member
I am having precisely the same experience as Mike. I assume that I (we) have not configured the tools correctly. I have tried setting (and resetting) everything as I think it should be. My settings match the settings in Mike Spreitzer's post. From the output infer (guess) that gdb is running and terminating, but like Mike I see no indication that my test program did anything Sad
Can anyone suggest what might be wrong with our settings. Or are we just completely misapplying the tool?

Ken Turner
Previous Topic:Load Build environment from a file
Next Topic:Live view variable debug
Goto Forum:
  


Current Time: Tue Apr 23 15:21:22 GMT 2024

Powered by FUDForum. Page generated in 0.03750 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top