Debugger stops program when stepping from the opening brace line to the first line of the function.

Morten Volden mvolden2 at
Thu Dec 29 21:42:04 UTC 2011

Hi All

I have been experiencing some problems with the debugger.

I have a piece of code that looks something like this:

#include <iostream>

#include <string>
#include <fstream>

class TestParse
    void parseConfigFile(std::string const& filename)
        std::ifstream is(filename.c_str());

        std::string line;
        while(std::getline(is, line))
            if(line.empty() || line[0] == '#')
                std::cout << "Empty line or comment" << std::endl;
            if(line[0] == '[')
                std::cout << "Section" << std::endl;
            std::cout << "Parameters" << std::endl;

int main(int argc, char **argv)
    TestParse test;

    return 0;

When I step into the 'parseConfigFile' function the debugger stops the
program stops as soon as I step from the opening brace line to the first
of the  function.

Running the program in GDB works as expected.

The output of the 'Show internal commands' in the GDB window is here:

A courious thing: It indicates that a break point is attempted set in a
file that belongs to another project (That project was not even loaded
during debug session)

Any idea what is going on here?

- When the split is pulled, mr. Grenade is no longer our friend
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the KDevelop-devel mailing list