Code::Blocks Forums

User forums => Help => Topic started by: Painkiller on April 01, 2011, 11:44:05 am

Title: Can't use debug menu.
Post by: Painkiller on April 01, 2011, 11:44:05 am
Hello everyone, I'm using C::B 10.05 on windows 7 32bit. My Code::Blocks can't not use debug menu. When I select debug menu, I can't not click or use hot keys like F8....If someone knows this problem, please tell me the way to solve this. Thanks. ( PS: My English isn't good. Sorry if someone can't understand. :-?? )
Title: Re: Can't use debug menu.
Post by: Jenna on April 01, 2011, 01:19:13 pm
I guess you try to debug a single file.
Debugging is only supported if you use projects at the moment.
Title: Re: Can't use debug menu.
Post by: hqt on August 08, 2011, 12:14:22 pm
Oh, I still face with this error :( I'm using Borland C++, and nearly change to Code::Block. So, you can tell me detail about " cannot debug a single file. Debugging is only supported if you use projects at the moment." please.
I create a project, example name HelloWorld. And in folder HelloWorld, I see 2 file Helloworld.cpp and main.cpp. I don't know with file I should use to code, and I choose main.cpp. But after I compile it (no error), I still cannot debug (debug menu cannot active).

Help me please, thanks :)
Title: Re: Can't use debug menu.
Post by: oBFusCATed on August 08, 2011, 12:33:10 pm
You can debug code compiled only with gcc (mingw) and visual studio.
For gcc you need to install gdb
For visual studio you need cdb (comes with "Debugging Tools for Windows")

Probably you can use cdb to debug code compiled with Borland C++, but I've not tried it, nor will I ever try it. You're on your own.
Title: Re: Can't use debug menu.
Post by: hqt on August 08, 2011, 06:22:41 pm
Yes, I compile code in Code::Block and use GCC complier. But I still cannot debug. (the menu [Debug] is gray, cannot active)
Title: Re: Can't use debug menu.
Post by: oBFusCATed on August 08, 2011, 06:29:49 pm
Then re-read what Jens said :)

Also read this: http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks
Title: Re: Can't use debug menu.
Post by: hqt on August 08, 2011, 06:40:14 pm
Yes, I also read on Wiki.CodeBlock before I'm starting to post here.
At that time when I read on Wiki.CodeBlock, I have done something here:
1) they said go to [project]\Build option, But in my menu Project, Build Option cannot active.
2) But I found another way (maybe !!!), I go to [setting][compiler and debugger] and I choose some category like Wiki.CodeBlock ( select produce debugging symbol, enable all compiler warning, disable -s etc) but I still cannot debug :(

and answer of jens, like I say above, I don't understand so much, so someone explain carefully for me, what should I need, please.

thanks :)
Title: Re: Can't use debug menu.
Post by: hqt on August 08, 2011, 07:25:27 pm
Oh, now I understand the answer of jens :) sorry with some silly questions of mine, because Code::Block IDE too different with BC IDE, so many things I don't know.

thanks for all :)