 |
Wednesday, November 19, 2003 |
 |
|
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.
|
|
| November 2003 |
| Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
| |
1 |
| 2 |
3 |
4 |
5 |
6 |
7 |
8 |
| 9 |
10 |
11 |
12 |
13 |
14 |
15 |
| 16 |
17 |
18 |
19 |
20 |
21 |
22 |
| 23 |
24 |
25 |
26 |
27 |
28 |
29 |
| 30 |
|
|