Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: flammi on October 26, 2006, 02:22:27 pm
-
Hello,
I want to debug a Win32 Gui Project.
The only problem is, that this App uses Threads ( CreateThread(...) ). ( debugging of Apps without Threads works fine! )
The debugger didn't stop at breakpoints in the Thread i created, only breakpoints in the WinMain Thread were recognized.
How can i debug the Thread i created with CreateThread()???
Produce debugging Symbols is enabled.
I am using Code::Blocks 1.0 revision 3140 (a Nightly Build) with MingW.
-
Nothing special to do. Set a breakpoint inside the thread's code and it will break. If it doesn't (and breakpoint filename error is not printed in the log), it means the code was never run.
-
See the warnings about breakpoints in ctor/dtors.
http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks
-
I just tested a breakpoint inside a thread proc in a winapi app, and gdb stops where it is. So that means your code wasn't run :)
Ps: Pecan, you forgot an s: http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks :)
-
See the warnings about breakpoints in ctor/dtors.
http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks
See: This page is useful from the first second... why didn't we do this in the first place...?! ;-)
-
Hmm, i created a new Build Target and now the debugger is working fine. I don't changed anything in the code and at the position of the breakpoints. :D
Thank you for your help.
-
Hmm, i created a new Build Target and now the debugger is working fine. I don't changed anything in the code and at the position of the breakpoints. :D
You may haver simply missed to *re*-build your sources after enabling the debugger switch. Thus the compiler still uses the old object files since they are up-to-date, but they don't inlcude debug symbols.
With regards, Morten.