Author Topic: C::B doesn't stop at breakpoints  (Read 6984 times)

Offline ninio_arg

  • Multiple posting newcomer
  • *
  • Posts: 12
C::B doesn't stop at breakpoints
« on: January 04, 2014, 09:03:09 am »
I know, I know. This is not a news. I've read the posts about this issue on this forum, but I couldn't fix it.

I'm on Slackware 14.1 and I've compiled CB 12.11 from the sources. I'm trying a simple C++ Hello Wold-like program just to check this problem.
I read this http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks and everything is fine (-g option, etc).
I don't have any space at the project path or at the C::B path.
When I run
Code
gdb executable
from a terminal, it says that symbols were loaded. So, -g is working.

I don't know what to do :S

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: C::B doesn't stop at breakpoints
« Reply #1 on: January 04, 2014, 11:29:13 am »
Enable and post the full log from the debugger.
Does in terminal gdb stop at breakpoints?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ninio_arg

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: C::B doesn't stop at breakpoints
« Reply #2 on: January 05, 2014, 12:38:10 am »
Does in terminal gdb stop at breakpoints?
Yes, it does.

Enable and post the full log from the debugger.
How can I do it?.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: C::B doesn't stop at breakpoints
« Reply #3 on: January 05, 2014, 01:02:00 am »
Settings -> Debugger -> Common -> Full log...

Then right click -> copy to clipboard
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ninio_arg

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: C::B doesn't stop at breakpoints
« Reply #4 on: January 05, 2014, 01:09:41 am »
Sorry, but I don't know what or where is the output. The "Debugger" tab in "Log & others" is empty. :S

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: C::B doesn't stop at breakpoints
« Reply #5 on: January 05, 2014, 03:02:20 am »
The "Debugger" tab in "Log & others" is empty. :S
It will have texts when your start the debugging.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ninio_arg

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: C::B doesn't stop at breakpoints
« Reply #6 on: January 05, 2014, 03:10:40 am »
The "Debugger" tab in "Log & others" is empty. :S
It will have texts when your start the debugging.
That's the problem. It hasn't. Even when the program stops waiting for an input.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: C::B doesn't stop at breakpoints
« Reply #7 on: January 05, 2014, 03:31:41 am »
It will have texts when your start the debugging.
That's the problem. It hasn't. Even when the program stops waiting for an input.
Strange, please tell us the exact steps you did. Thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ninio_arg

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: C::B doesn't stop at breakpoints
« Reply #8 on: January 05, 2014, 07:45:40 am »
I open my project (.cbp). The build target is "Debug". I click on Build (or Rebuild). After checking the tab "Build messages" and see everything is fine, I put my breakpoints and I click on "Run".
Breakpoints aren't read, and if the program stops at some user input, the "Debugger" tab is empty. Indeed, it's empty all the time.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: C::B doesn't stop at breakpoints
« Reply #9 on: January 05, 2014, 07:59:25 am »
I open my project (.cbp). The build target is "Debug". I click on Build (or Rebuild). After checking the tab "Build messages" and see everything is fine, I put my breakpoints and I click on "Run".
Breakpoints aren't read, and if the program stops at some user input, the "Debugger" tab is empty. Indeed, it's empty all the time.
Note, you should click the "Debug/Continue" button, not "Run" button to start debugging.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ninio_arg

  • Multiple posting newcomer
  • *
  • Posts: 12
[Solved] Re: C::B doesn't stop at breakpoints
« Reply #10 on: January 05, 2014, 08:06:52 am »
I open my project (.cbp). The build target is "Debug". I click on Build (or Rebuild). After checking the tab "Build messages" and see everything is fine, I put my breakpoints and I click on "Run".
Breakpoints aren't read, and if the program stops at some user input, the "Debugger" tab is empty. Indeed, it's empty all the time.
Note, you should click the "Debug/Continue" button, not "Run" button to start debugging.
OMG!!. What a shame!!. Yes sir, that's all!. Just use Start / Continue (F8), and not Run (F9).

Thank you so much!.
« Last Edit: January 05, 2014, 08:20:13 am by ninio_arg »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: C::B doesn't stop at breakpoints
« Reply #11 on: January 05, 2014, 08:45:01 am »
 ;D ::) :P
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]