Author Topic: Breakpoints not working  (Read 2799 times)

Offline Nale

  • Single posting newcomer
  • *
  • Posts: 3
Breakpoints not working
« on: December 29, 2008, 09:54:40 pm »
When I attempt to debug my program, it never stops, no matter where I put breakpoints. It just ignores them completely and continues execution. I looked around on the forums, and it seems like this problem is usually caused by an incorrect path for the symbols table or something like that, but I am mystified because my debugger log does not say anything about missing symbol tables.

This is what it looks like

Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: F:\CodeBlocksI\Projects\M1CA\myfirstconsoleapp\
Adding source dir: F:\CodeBlocksI\Projects\M1CA\myfirstconsoleapp\
Adding file: bin\Debug\myfirstconsoleapp.exe
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb 6.7.50.20071127
Child process PID: 2040
Program exited normally.
Debugger finished with status 0
Build succeeded
Selecting target:
Debug
Adding source dir: F:\CodeBlocksI\Projects\M1CA\myfirstconsoleapp\
Adding source dir: F:\CodeBlocksI\Projects\M1CA\myfirstconsoleapp\
Adding file: bin\Debug\myfirstconsoleapp.exe
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb 6.7.50.20071127
Child process PID: 3348
Program exited normally.
Debugger finished with status 0

I'm also not sure why it repeats twice like that.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5377
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Breakpoints not working
« Reply #1 on: January 04, 2009, 02:52:39 pm »
I think it's not related to "path setting".
See a small video tutorials about a console sample here:
http://sites.google.com/site/studycodeblocks/Home/test_video.swf

You can follow my steps and see if it works. Good luck!
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.