This Question is Not Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
2 Replies Last post: Jul 18, 2013 6:06 AM by Patrick Burton  
Patrick Burton Newbie 18 posts since
Dec 24, 2012
Currently Being Moderated

Jul 15, 2013 12:05 AM

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.

Attachments:
Anton Makeev JetBrains 1,266 posts since
Dec 19, 2006
Currently Being Moderated
Jul 17, 2013 6:15 PM in response to: Patrick Burton
Re: can't debug simple hello world program.

Patrick,

we can't reproduce the problem with your project.

Please add the following code to AppCode.app/bin/log.xml file:

{code}
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
  ...
  <!-- these tags should be added right before <root> tag -->
  <category name="#com.jetbrains.cidr.execution.debugger">
    <priority value="DEBUG"/>
    <appender-ref ref="CONSOLE-DEBUG"/>
  </category>
  <category name="#com.jetbrains.cidr.execution.testing">
    <priority value="DEBUG"/>
    <appender-ref ref="CONSOLE-DEBUG"/>
  </category>
  <category name="#com.jetbrains.cidr.execution.deviceSupport.AMDeviceManager">
    <priority value="DEBUG"/>
    <appender-ref ref="CONSOLE-DEBUG"/>
  </category>
  <root>
  ...
{code}
After that, restart AppCode and when the problem reproduces, attach log files (Help | Show Log in Finder) and attach it to the issue in our public tracker.
We'll investigate asap.

More Like This

  • Retrieving data ...