bartop

palmoswerks ARCHIVE
Palm OS programming tips from a (former) CodeWarrior insider

header

Navigation

Search
Home
About
Stories
Stuff I Like
Articles
PilRC
CodeWarrior
palmos.techwood.org
DevTools List
Palm OS Dev FAQ

Why Can't I Set a Breakpoint?

I see a question from time to time that goes like:

I tried setting a breakpoint in CodeWarrior, but the debugger never stops on the line. When I look at it during debugging, the breakpoint is light red, rather than the bold red used for most of my breakpoints. What's going on?

There are a few possiblities:

First, make sure the compiler is generating debug information for your source file. This is controlled by the debug column in your project window; a dot should be in the column with the bug at the top.

If this is set, then the likely reason you can't set a breakpoint is due to inlining or optimization of code. If you declare your function as inline or you have auto-inlining turned on in the C/C++ Language panel, you may not be able to set a breakpoint, as there no one code location that maps to your source code line.

Finally, you might not be able to set a breakpoint due to dead stripping by the linker. This is where code isn't included in the final program because it is never called.

brought to you by weblogger.com


Send feedback to combee@techwood.org
Copyright © 2004 Benjamin L. Combee
Palm OS is a registered trademark of PalmSource, Inc.
Metrowerks and CodeWarrior are registered trademarks of Metrowerks Inc.

The views expressed on this website/weblog are those of mine alone and do not necessarily reflect the views of PalmSource or Metrowerks.

This is a Manila Site

qwertYAK / frobnovich