There is a debug issue with CodeBlocks for some time (at least 3 years) that I found a bit annoying. I am posting this because I did not see the (obvious) workaround until recently and in case I am not the oly one
.
The issue is that the call stack it not filled at the first stop after a start in Debug mode.
It works fine after the first manual debug step. Its easy to workaround by just setting the breakpoints one step ahead of the actual target except when trying the debug a crash. Then I needed an otherwise unneeded breakpoint at the very start of the program so it would have a safe stop before the crash.
What I missed is that the call stack is actually there, it seems that the very first CallStack window update is lost for some reason. Disabling and re-enabling the CallStack window with the debug tool bar icon "debug windows" the call stack is visible directly even at the first stop.
But I also found that a CallStack Window open by default is one of the 3 things that can slow down the debugger qute a lot, at least for large projects. It got the single step time down from 10sec to 1sec with the CodeBlocks source with those settings
- CallStack window closed.
- debug option "Watch function arguments" disabled
- debug option "Watch local variables" disabled
The final must-know on Linux debuging is that breakpoints set before debugger start can not be removed during runtime except manually with GDB commands. The broken breakpoints can be seen in the breakpoint window to show the index "-1". The can be removed in the Debugger window by using the two gdb commands "info break" and "del break N" with N the breakpoint number as listed in the info command output.
happy debugging
Note: Issues seen in Ubuntu Linux 22.04 and 18.04 (trunk compiled with GTK3.0). Might be Linux only.