0

can't debug simple hello world program.

For whatever reason I can't debug a program. I set a breakpoint and then it the process just keeps running but never stops at the breakpoint... It keeps running even after hitting the stop button (I know this from looking at Activity Monitor)

My program is a c++ console application:

main.cpp:


#include <iostream>
#include "Foo.h"

int main(int argc, const char * argv[])
{

    int x[2];   <BREAK>
    x[0] = 3;


    // insert code here...
    std::cout << "Hello, World!\n";  <BREAK>



    return 0;
}



Foo.cpp:



#include "Foo.h"

Foo::Foo(){

}



Foo.h:


#ifndef __Foo_H_
#define __Foo_H_

#include <iostream>


class Foo {

    Foo();
};


#endif //__Foo_H_

Where <BREAK> is where I placed the breakpoints

I've also attached the project below.

Any ideas?

I'm on a Mac, Mountain Lion running AppCode 2.1.2

EDIT:

The problem seems to only happen when using the LLDB debugger. GDB works fine.



Attachment(s):
Test.zip

2 comments

Please sign in to leave a comment.