Search code examples
c++debuggingeclipse-cdt

Eclipse - C++ - debugger terminating immediately


When I debugged a C program, with breakpoints - it was all fine. Now I`m debugging a C++ program (simple cout print one), and it just "terminates" immediately - instead of going through some of the breakpoints I put. On debug mode it doesn't even print the cout (that IS printed on a regular run). I don't really know what's going wrong - debugger options? Compiler?

EDIT: So several comments said I need a code attached and more information. So here is the code and info! (Tell me if its enough.)

Steps taken: literally created by eclipse "new project -> c++ project -> 'HelloWorld C++ project' / MinGW GCC" with 'debug/release' ticks marked and then compiled and debugged (nothing else!).

#include <iostream>
using namespace std;

int main() {
    cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
    return 0;
}

As I said, works in run mode but debugger doesn't work. Tell me if any more information is needed. I'm very new, and cynical comments like "your project has no code so that why it failed" don't help me TBH.


Solution

  • UPDATE: I didn't solve the problem in eclipse, so I downloaded Visual-Studio 2017 ("Express"/"Community" its called) and it works there. In the beginning it also didn't because it didn't find some DLLs, but allowing an option called "Microsoft Symbol Server" in its' debugger settings solved it and now it works.

    So problem "bypassed" rather than "solved" I would say (So if anyone experiences the same problems as mine, doing what I did will allow you to work on c++).