User forums > Help
[solved] problem with debugging in CB 10.05 for Windows
cbuser2:
Hi all. I don't have this problem for CB for linux, only for with CB for Windows. I am using MinGW and gdb.
If I click "start", or "step into", the output window opens and closes immediately, and the debugging session ends. If I set a breakpoint, the watch windows shows that the variables have expected values, so the program is running.
Why does the debugging finish without allow me to participate? Basically the debugging process is just running the program. Once I click "start" or "step into", the debugging ends without any further interaction on my part.
Thanks in advance.
MortenMacFly:
--- Quote from: cbuser2 on October 22, 2012, 07:21:02 am ---Why does the debugging finish without allow me to participate? Basically the debugging process is just running the program. Once I click "start" or "step into", the debugging ends without any further interaction on my part.
--- End quote ---
This usually happens if you forgot to compile with the -g debug switch, if you additionally enabled optimisations (with some compilers at last), and/or if you stripped the symbols using the -s switch.
Inspect your full compiler log (see my sig) accordingly and post here, if in doubt.
cbuser2:
--- Quote from: MortenMacFly on October 22, 2012, 07:30:00 am ---
--- Quote from: cbuser2 on October 22, 2012, 07:21:02 am ---Why does the debugging finish without allow me to participate? Basically the debugging process is just running the program. Once I click "start" or "step into", the debugging ends without any further interaction on my part.
--- End quote ---
This usually happens if you forgot to compile with the -g debug switch, if you additionally enabled optimisations (with some compilers at last), and/or if you stripped the symbols using the -s switch.
--- End quote ---
The -g had been set, there were no optimisations, and -s had not been set.
I've read the code blocks wiki, and it says turning on the compiler logging will make Code::Blocks output the exact commands it uses to compile your code. But where is the log stored? I can't find it.
Thank you.
stahta01:
--- Quote from: cbuser2 on October 23, 2012, 01:23:54 am ---But where is the log stored? I can't find it.
Thank you.
--- End quote ---
Do a re-build; DO NOT do a build and run.
Then look in the log window.
The tab called "build log" has the build log in it.
F2 toggles the log window on and off.
Tim S.
cbuser2:
This is the output from a rebuild. The program doesn't make use of libcurl at all, although the libcurl libraries are linked in the global settings.
--- Code: ----------------- Clean: Debug in test3 ---------------
Cleaned "test3 - Debug"
-------------- Build: Debug in test3 ---------------
mingw32-gcc.exe -Wall -g -Wall -g -IC:\curl-7.28.0\include\curl -c "C:\Users\thismoment\Documents\c programming\test3\main.c" -o obj\Debug\main.o
mingw32-g++.exe -LC:\curl-7.28.0\lib -o bin\Debug\test3.exe obj\Debug\main.o C:\curl-7.28.0\lib\libcurl.a C:\curl-7.28.0\lib\libcurldll.a
Output size is 25.28 KB
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version